0

I have a problem with an application I'm building, multilingual.

I have 4 languages ​​​​(Portuguese, Spanish, English, Polish) and I would like to encode texts in 4 languages.

Note: I'm using lua for some scripts, this way, I'm intercepting the string, and converting the encoding depending on the language.

To convert the string to ISO-8859-1 I already managed using this guide -> Code

How would I convert it to ISO-8859-2?

I tried to use the same conversion, but how the unicode change in the iso-8859-1 to iso-8859-2 code would be done

Dragose
  • 11
  • 3
  • 1
    Your link doesn't work. – Shawn Nov 19 '22 at 16:51
  • Latin-1 is easy because the Unicode encoding basically takes the codepoints from 128-255 and assigns them their Latin-1 meanings. So if you convert UTF-8 to a codepoint, you just store that number as the value for Latin-1 (if it is <256). Latin-2 requires more effort, an actual mapping from Unicode codepoints to the specific Latin-2 encodings. – Nicol Bolas Nov 19 '22 at 16:53
  • 2
    Can you explain why you want to re-encode UTF-8 as this will by definition support all the languages you list? LUA also supports basic UTF-8 handling. – Richard Critten Nov 19 '22 at 17:04
  • https://unicode-org.github.io/icu/userguide/conversion/ – Hans Passant Nov 19 '22 at 17:12

0 Answers0