[21171] Ensure unicode characters in app label are shown correctly#6535
Conversation
| end if | ||
|
|
||
| if pOutEncoding is not empty then | ||
| if pOutEncoding is not empty and not (pString contains "android:label") then |
There was a problem hiding this comment.
@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.
There was a problem hiding this comment.
@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.
There was a problem hiding this comment.
hmm... is whatever you are viewing it in reading it as utf8?
There was a problem hiding this comment.
oh... the app label... hmm
There was a problem hiding this comment.
@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
There was a problem hiding this comment.
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
|
Thanks @montegoulding, this did the trick :) |
|
@livecode-vulcan review ok aef5a99 |
|
💙 review by @montegoulding ok aef5a99 |
[21171] Ensure unicode characters in app label are shown correctly Depends on livecode/livecode-ide#1976
|
😎 test success aef5a99
|
Depends on livecode/livecode-ide#1976