Revision: b54d66290d54
Branch: default
Author: Jussi Malinen <jussi.ao.mali...@gmail.com>
Date: Thu Sep 19 13:35:20 2013 UTC
Log: Decode utf-8 with built in browser functions, that support astral
plane characters.
Update issue 1526
Cc: jussi.ao.malinen
http://code.google.com/p/robotframework/source/detail?r=b54d66290d54
Modified:
/src/robot/htmldata/rebot/testdata.js
=======================================
--- /src/robot/htmldata/rebot/testdata.js Fri Feb 15 21:45:46 2013 UTC
+++ /src/robot/htmldata/rebot/testdata.js Thu Sep 19 13:35:20 2013 UTC
@@ -267,7 +267,11 @@
function extract(text) {
var decoded = JXG.Util.Base64.decodeAsArray(text);
var extracted = (new JXG.Util.Unzip(decoded)).unzip()[0][0];
- return JXG.Util.utf8Decode(extracted);
+ // To decode UTF-8 in javascript, there is this interesting
hack:
+ //
http://ecmanaut.blogspot.ca/2006/07/encoding-decoding-utf8-in-javascript.html
+ // This works also for characters outside of Unicode BMP
(unlike
+ // JXG.Util.utf8Decode)
+ return decodeURIComponent(escape(extracted));
}
function get(id) {
--
---
You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to robotframework-commit+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.