joshua655 / v8cgi

Automatically exported from code.google.com/p/v8cgi
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Missing utf8encode and utf8decode #78

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
require('binary').utf8encode('');

What is the expected output? What do you see instead?
TypeError: Object #<an Object> has no method 'utf8encode'

What version of the product are you using? On what operating system?
Debian Squeeze Linux, v8cgi 0.9.0

Please provide any additional information below.
After upgrading to version 0.9.0 I can't find these functions.

Original code: "Util.utf8encode('');" doesn't work anymore.

On API_Util wiki page is written: "utf8encode() and utf8decode() are supported 
by Binary module". I tried to find them in sources but unsuccessfully.

Thank you for help. :-)

Jan Snasel

Original issue reported on code.google.com by snas...@gmail.com on 29 Dec 2010 at 3:57

GoogleCodeExporter commented 9 years ago
The functionality is indeed provided by the binary module, but not via 
"utf8encode" and/or "utf8decode" functions.

Sample code:
{{{
var Buffer = require("binary").Buffer;
var b = new Buffer("žšč", "utf-8");
system.stdout(b.toSource());
}}}

Please see the Binary/F specification (http://wiki.commonjs.org/wiki/Binary/F) 
to see how this works.

Original comment by ondrej.zara on 29 Dec 2010 at 4:11

GoogleCodeExporter commented 9 years ago

Original comment by ondrej.zara on 29 Dec 2010 at 4:12