Closed slime73 closed 13 years ago
Original comment by Anonymous.
I'd like to know more about this issue. What exactly is that Lua doesn't "gracefully" do about utf-8? Do you have samples / links?
Original comment by Дмитрий Ларченко (Bitbucket: neokril, GitHub: neokril).
//Yeah, I'm kind of afraid of that, we do want to have standard lua..//
Maybe use some separate resource files with localized (UTF) strings. In code we can use ASCII ID's of that strings...
Example:
love.graphics.print( love.gettext("Hello") )
Original comment by Anonymous.
Bump!
Original comment by Anonymous.
Bump!
Original comment by Eduard Matsukov (Bitbucket: [Eduard Matsukov](https://bitbucket.org/Eduard Matsukov), ).
Would be nice to use something like iconv library. Added the soruce for lua 5.1.4 It works via code:
#!lua
require 'iconv/init'
print(('Кириллица - cyrillic text'):convert('cp1251','utf-8'))
Supported encodes: ASCII, ISO-8859-{1,2,3,4,5,7,9,10,13,14,15,16}, KOI8-R, KOI8-U, KOI8-RU, CP{1250,1251,1252,1253,1254,1257}, CP{850,866}, CP{437,737,775,852,853,855,857,858,860,861,863,865,869,1125}, Mac{Roman,CentralEurope,Iceland,Croatian,Romania}, Mac{Cyrillic,Ukraine,Greek,Turkish}, Macintosh UTF-8, UTF-16, UTF-16BE, UTF-16LE, UTF-32, UTF-32BE, UTF-32LE, UTF-7, UCS-2, UCS-2BE, UCS-2LE, UCS-4, UCS-4BE, UCS-4LE, C99, JAVA, UCS-2-INTERNAL, UCS-4-INTERNAL ISO-8859-{6,8}, CP{1255,1256}, CP862, CP864, Mac{Hebrew,Arabic} HP-ROMAN8, NEXTSTEP ARMSCII-8 VISCII, TCVN, CP1258 Georgian-Academy, Georgian-PS EUC-CN, HZ, GBK, GB18030, EUC-TW, BIG5, CP950, BIG5-HKSCS, ISO-2022-CN, ISO-2022-CN-EXT EUC-KR, CP949, ISO-2022-KR, JOHAB MuleLao-1, CP1133 KOI8-T TIS-620, CP874, MacThai EUC-JP, SHIFT_JIS, CP932, ISO-2022-JP, ISO-2022-JP-1, ISO-2022-JP-2
Hope it may be usefull.
Original comment by Eduard Matsukov (Bitbucket: [Eduard Matsukov](https://bitbucket.org/Eduard Matsukov), ).
There is good xml-parser (wxXmlDocument) in wxLua (wxWidgets binded to native Lua) with decoding local user file on loading - it could be usefull, i hope.
Original comment by Meng Jie (Bitbucket: inmouse, ).
I have a experimental implementation of output utf-8 string in love. It is avaliable in my fork.
In the implementation, string is just simply treat as a utf-8 string, because utf-8 is compatible with the ANSI(0-127), so in most time it works fine.
please kindly check it. thanks.
Original comment by m (Bitbucket: m, GitHub: m).
I just got that to compile (if my experience is typical, anyone who can compile the main branch should be able to handle the modified version). What kind of tests should I be running on it? I got Hello World with gratuitous unicode added to work properly, but I assume that stuff like framerate and memory consumption are potential concerns. (Just, generically. Imagine I am utterly unqualified to make any statements about this, because I am.)
I'm running Snow Leopard on a new MacBook Pro, and there's an outside chance I can bash out binaries for other platforms if anyone else is curious, but has even more trouble compiling than I did. (I make no guarantees about stuff like... compatibility with anything other than my specific architectures, because I'm completely new at anything more advanced than compile-make-make.)
Original comment by Anonymous.
Two questions about "This is implemented as of r542:4ca613c9690e . Finally."
Can someone please explain to the newbie how to use it?
Does 0.7.1 version(for Windows) includes this? And if not then when?
Best regards, Anonymous Lover.
Original comment by Boolsheet (Bitbucket: Boolsheet, GitHub: Boolsheet).
Dear Anonymous Lover
UTF8 will be included in LÖVE 0.8.0.\ You can already use it by building the minor branch of this repository yourself, but it's in a early stage right now and probably has some bugs.
Once you have a running executable you can pass UTF8 strings to love.graphics.print().
Original report by Linus (Bitbucket: thelinx, GitHub: thelinx).