Thread Tools Display Modes
01/05/15, 05:51 PM   #1
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
Question bout "Umlaut" and "special characters" (e.g. french) in LUA

Hey there,

I wonder if ESO LUA will work correctly with the umlauts and e.g. french characters like è, é and ê?
Most of the time the addons seem to work well, but some users use special characters for the translations (escape charaters, looks like UTF-8 characters or something like that).

Here is an example list:
Lua Code:
  1. --[[ Umlauts & special characters list
  2.    à : \195\160    è : \195\168    ì : \195\172    ò : \195\178    ù : \195\185
  3.    á : \195\161    é : \195\169    í : \195\173    ó : \195\179    ú : \195\186
  4.    â : \195\162    ê : \195\170    î : \195\174    ô : \195\180    û : \195\187
  5.    ã : \195\163    ë : \195\171    ï : \195\175    õ : \195\181    ñ : \195\177
  6.    æ : \195\166    ø : \195\184
  7.    ç : \195\167    œ : \197\147
  8.    Ä : \195\132    Ö : \195\150    Ü : \195\156    ß : \195\159
  9.    ä : \195\164    ö : \195\182    ü : \195\188
  10. ]]

Do we need to use these escape characters for our translations or can we just use the normal characters like ä Ä ö Ö ü Ü é è ê in the localization lua files? Or doesn#t it make any difference?

Tahnks.

Baertram
  Reply With Quote
01/05/15, 06:29 PM   #2
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
It depends on encoding used in your text editor. Game supports UTF-8 encoding, so make sure that you have selected correct encoding in your text editor. All text editors by default use the same encoding as operating system, so for example I had to change encoding in editor from Windows-1250 to UTF-8 w/o BOM (byte order mark).

In short - if you save file encoded as UTF-8, you don't need to replace special characters with escape codes.
  Reply With Quote
01/05/15, 08:43 PM   #3
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
no problem for writing special european characters such as éàçôû, etc. encode your files in utf-8 and all will be okay, but eso isn't compatible utf-8 at all if you tend tu write some special characters in chineese, korean, indian, etc. ask to russians
  Reply With Quote
01/05/15, 08:44 PM   #4
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
Alright, thx.
  Reply With Quote
01/06/15, 09:51 AM   #5
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
Yes Ayantir, I noticed some characters will not be shown correctly even if you use UTF-8 w/o BOM files in your addons and if you escape the characters :-(

e.g. the spanish character
ñ : \195\177

I've tried it with and without escaping them. Eso will only show a "x" instead.
  Reply With Quote
01/06/15, 11:36 AM   #6
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
Yes, ISO-8859-1 is not really implemennted entirely, quite strange, but reallity.
We got base latin and not latin1. and special chars are coded on 2 bytes

Last edited by Ayantir : 01/06/15 at 11:42 AM.
  Reply With Quote
01/09/15, 05:32 PM   #7
mctaylor
 
mctaylor's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 21
Originally Posted by Baertram View Post
[...] some characters will not be shown correctly even if you use UTF-8 [without] BOM [...]

e.g. the spanish character
ñ : \195\177
One possible factor is that I doubt (I am guessing here) that it is handling "font substitution" so that if the current font (er, typeface or font family) does not have a particular glyph (e.g. ñ - 'n' with an accent/diacritic) the OS's type system (such as used in most traditional applications such as a web browser or word processor) will try to find the glyph in a related or "base" font (family).

I suspect the limited language support is somewhat reflective of the translations provided by Bethesda (no Spanish or Russia I believe).

So try to ensure the glyph is present in the font being used. I suspect many less common fonts (i.e. not system or general purpose fonts like Helvetica or Arial) will lack glyphs with accents. It is pretty common situation in "fantasy" or "fun" fonts.
  Reply With Quote

ESOUI » Developer Discussions » Translation Help » Question bout "Umlaut" and "special characters" (e.g. french) in LUA

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off