We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I think string in PHP is utf8 bytes. Consider the following code:
$buffer = new Buffer('abcàê߀abc', 'ascii'); echo $buffer->length(); // 15
if you dump you'll see:
array(15) { [0]=> int(97) [1]=> int(98) [2]=> int(99) [3]=> int(195) [4]=> int(160) [5]=> int(195) [6]=> int(170) [7]=> int(195) [8]=> int(159) [9]=> int(226) [10]=> int(130) [11]=> int(172) [12]=> int(97) [13]=> int(98) [14]=> int(99) }
It should be 10 and looks like:
array(10) { [0]=> int(97) [1]=> int(98) [2]=> int(99) [3]=> int(224) [4]=> int(234) [5]=> int(223) [6]=> int(172) [7]=> int(97) [8]=> int(98) [9]=> int(99) }
In nodejs:
new Buffer('abcàê߀abc', 'ascii'); <Buffer 61 62 63 e0 ea df ac 61 62 63> // [97, 98, 99, 224, 234, 223, 172, 97, 98, 99]
new Buffer('abcàê߀abc', 'utf8'); <Buffer 61 62 63 c3 a0 c3 aa c3 9f e2 82 ac 61 62 63> // [97, 98, 99, 195, 160, 195, 170, 195, 159, 226, 130, 172, 97, 98, 99]
How to fix it?
The text was updated successfully, but these errors were encountered:
IMHO buffer usage looks bad (.dirty), so I remove the buffer in the new version of rlp.
Sorry, something went wrong.
sc0Vu
No branches or pull requests
I think string in PHP is utf8 bytes. Consider the following code:
if you dump you'll see:
It should be 10 and looks like:
In nodejs:
How to fix it?
The text was updated successfully, but these errors were encountered: