Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

[21171] Ensure unicode characters in app label are shown correctly#6535

Merged
livecodepanos merged 3 commits into
livecode:develop-9.0from
livecodepanos:bugfix-21171
Jun 29, 2018
Merged

[21171] Ensure unicode characters in app label are shown correctly#6535
livecodepanos merged 3 commits into
livecode:develop-9.0from
livecodepanos:bugfix-21171

Conversation

@livecodepanos

Copy link
Copy Markdown
Contributor

end if

if pOutEncoding is not empty then
if pOutEncoding is not empty and not (pString contains "android:label") then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@livecodepanos are we sure this is necessary. From the looks of things we are writing the template manifest as utf8 then reading it in again and decoding as utf8 in order to merge so when we re-encode the merged manifest (which I think is here) we would not want to skip it I think.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@montegoulding I am not 100% sure what happens here, but I noticed that if I remove this, then the app label (say 样品) appears as ʆ∑ÂìÅ (which is the textEncode("样品","utf-8") ) in the device.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm... is whatever you are viewing it in reading it as utf8?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh... the app label... hmm

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@livecodepanos I have found the problem with the encoding here. The issue is the call to ConvertArrayToXML does not pass in the encoding of the array and therefore it does not do the decode before encoding. https://github.com/livecodepanos/livecode/blob/f6fc285f56973023573c426ff589182dd0f3ed10/ide-support/revsaveasandroidstandalone.livecodescript#L1602

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I'm fairly sure if you change that line to ConvertArrayToXML(tMainArrayA, "utf-8") then you won't need to have this special case in EncodeString because it will do the textDecode... BTW it might be worthwhile adding this to the top of EncodeString so we aren't wasting our time:

if pInEncoding is pOutEncoding then
     return pString
end if

@livecodepanos

Copy link
Copy Markdown
Contributor Author

Thanks @montegoulding, this did the trick :)

@montegoulding

Copy link
Copy Markdown
Contributor

@livecode-vulcan review ok aef5a99

@livecode-vulcan

Copy link
Copy Markdown
Contributor

💙 review by @montegoulding ok aef5a99

livecode-vulcan added a commit that referenced this pull request Jun 29, 2018
[21171] Ensure unicode characters in app label are shown correctly

Depends on livecode/livecode-ide#1976
@livecode-vulcan

Copy link
Copy Markdown
Contributor

😎 test success aef5a99

  • try-community-armv6-android-sdk26_ndk16r15: success
  • try-community-armv7-android-sdk26_ndk16r15: success
  • try-community-arm64-android-sdk26_ndk16r15: success
  • try-community-x86-android-sdk26_ndk16r15: success
  • try-community-x86_64-android-sdk26_ndk16r15: success
  • try-community-js-emscripten-sdk1.35: success
  • try-community-universal-ios-iphoneos11.4: success
  • try-community-universal-ios-iphonesimulator11.4: success
  • try-community-universal-mac-macosx10.9: success
  • try-community-x86-linux-debian8: success
  • try-community-x86_64-linux-debian8: success
  • try-community-x86-win32: success
  • try-community-x86_64-win32: success

@livecodepanos livecodepanos merged commit 9fee820 into livecode:develop-9.0 Jun 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants