Skip to content
New issue

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

Fail to build from source in big-endian platform #53

Open
czchen opened this issue Feb 8, 2016 · 4 comments
Open

Fail to build from source in big-endian platform #53

czchen opened this issue Feb 8, 2016 · 4 comments
Labels

Comments

@czchen
Copy link
Member

czchen commented Feb 8, 2016

See https://bugs.debian.org/814124

@Chocobo1
Copy link
Member

Probably related to #24.

@czchen czchen added the bug label Feb 12, 2016
@czchen
Copy link
Member Author

czchen commented Feb 12, 2016

The following is result from s390x build. Looks like QJsonValue.toString has different byte order then QString. Need to figure out which one is wrong.

/home/czchen/src/chewing-editor-0.0.1/test/testChewingExporter.cpp:96: Failure
Value of: obj["phrase"].toString()
  Actual: { 2-byte object <2C-6E>, 2-byte object <66-8A> }
Expected: QString("\xE6\xB8\xAC\xE8\xA9\xA6" )
Which is: { 2-byte object <6E-2C>, 2-byte object <8A-66> }
/home/czchen/src/chewing-editor-0.0.1/test/testChewingExporter.cpp:99: Failure
Value of: obj["bopomofo"].toString()
  Actual: { 2-byte object <18-31>, 2-byte object <1C-31>, 2-byte object <CB-02>, 2-byte object <20-00>, 2-byte object <15-31>, 2-byte object <CB-02> }
Expected: QString("\xE3\x84\x98\xE3\x84\x9C\xCB\x8B \xE3\x84\x95\xCB\x8B" )
Which is: { 2-byte object <31-18>, 2-byte object <31-1C>, 2-byte object <02-CB>, 2-byte object <00-20>, 2-byte object <31-15>, 2-byte object <02-CB> }

@czchen
Copy link
Member Author

czchen commented Feb 12, 2016

QJsonValue.toString does not create the correct QString in big-endian platform. Need to submit this issue to upstream.

/home/czchen/src/chewing-editor-0.0.1/test/testChewingExporter.cpp:96: Failure
Value of: obj["phrase"].toString().toUtf8()
  Actual: { '\xE2' (226), '\xB1' (177), '\xAE' (174), '\xE6' (230), '\x9A' (154), '\x8A' (138) }
Expected: QString("\xE6\xB8\xAC\xE8\xA9\xA6").toUtf8()
Which is: { '\xE6' (230), '\xB8' (184), '\xAC' (172), '\xE8' (232), '\xA9' (169), '\xA6' (166) }
/home/czchen/src/chewing-editor-0.0.1/test/testChewingExporter.cpp:99: Failure
Value of: obj["bopomofo"].toString().toUtf8()
  Actual: { '\xE1' (225), '\xA0' (160), '\xB1' (177), '\xE1' (225), '\xB0' (176), '\xB1' (177), '\xEC' (236), '\xAC' (172), '\x82' (130), '\xE2' (226), '\x80' (128), '\x80' (128), '\xE1' (225), '\x94' (148), '\xB1' (177), '\xEC' (236), '\xAC' (172), '\x82' (130) }
Expected: QString("\xE3\x84\x98\xE3\x84\x9C\xCB\x8B \xE3\x84\x95\xCB\x8B" ).toUtf8()
Which is: { '\xE3' (227), '\x84' (132), '\x98' (152), '\xE3' (227), '\x84' (132), '\x9C' (156), '\xCB' (203), '\x8B' (139), ' ' (32, 0x20), '\xE3' (227), '\x84' (132), '\x95' (149), '\xCB' (203), '\x8B' (139) }

@Chocobo1
Copy link
Member

should we close this one? it's a upstream bug, IMO we need not to track it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants