Forum Post: PDSOE scratchpad (11.3) ignores source code code-page settings

  • Thread starter Thread starter andrew.may
  • Start date Start date
Status
Not open for further replies.
A

andrew.may

Guest
The following code behaves oddly in the scratchpad, I suspect that the issue is that the scratchpad doesn't respect Eclipse source-file codepage settings & just assumes that source is in cp1252 when compiling. output to c:\scratchpad\pound.txt convert source "utf-8" target "1252". put unformatted "£" skip. output close. I've got a pure UTF-8 setup... source is UTF-8 encoded, as is cpinternal, cpstream etc... If I create a new project & save the code below as a new .p & run it, it does the expected thing of displaying the pound (sterling) sign in cp1252 (i.e. the hex value 0xA3) If I run it from the scratchpad (in the new project's AVM), I get no errors, but the file it produces is a load of garbage. Some testing has suggested that the problem is with the parsing of the literal "£" in the source code. If I replace the "£" with chr(163,"utf-8","1252") i.e. "the £ sign in UTF-8" ... then the program works as expected. If I save the source in the scratchpad, then the saved source is in cp1252. However, the scratchpad editor UI is encoding in UTF8 & can accept entry of & render any unicode character. Does anyone have a workaround, or is this just a bug to log?

Continue reading...
 
Status
Not open for further replies.
Back
Top