-
|
I am writing a Japanese program (simplied as follows): The output when I do a query ... even when I tried the LANG and LC_ALL trick and run Is this an issue of limited charset support at the current version of mangle or have I setup something wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
This is due to the way the interpreter is implemented. It is a shortcoming, I filed #61 to address your problem. The interpreter uses the String() method to format a Mangle "constant" (value): mangle/interpreter/interpreter.go Line 244 in 081bd25 The String() method is implemented in a way that it will always escape characters (not the Escape call here): Line 512 in 081bd25 The interpreter has many shortcomings since it was only added for quick experiments. The easiest fix to support proper unicode output would be if the interpreter supported an output mode that does not use the ast.Constant String() method, but output strings directly. |
Beta Was this translation helpful? Give feedback.
This is due to the way the interpreter is implemented. It is a shortcoming, I filed #61 to address your problem.
The interpreter uses the String() method to format a Mangle "constant" (value):
mangle/interpreter/interpreter.go
Line 244 in 081bd25
The String() method is implemented in a way that it will always escape characters (not the Escape call here):
mangle/ast/ast.go
Line 512 in 081bd25
The interpreter has many shortcomings since it was only added for quick experiments.
This particular choice was done because before there were byte strings, people used strings …