Commit Graph

28 Commits (f0288282bef8e3c3f20fd68910a43707fa6c9744)

Author SHA1 Message Date
scrawl 0efce6cd4c Fix typo in a comment 9 years ago
scrawl 16ddfbca14 Remove some outdated todo comments 10 years ago
scrawl f931ba2efc Fix some static analysis issues (coverity) 10 years ago
scrawl 41c17bccb6 Exit if an unknown encoding option is specified 11 years ago
scrawl daab4f55a3 Use Morrowind's fonts 12 years ago
Nathan Jeffords 44b1c66c4b fixed various warnings about converting size_t to int 12 years ago
Douglas Mencken df5919f2c5 Use `signed char' explicitly where needed. It is important because:
- It is implementation-dependent if plain `char' signed or not.
- C standard defines three *distinct* types: char, signed char,
  and unsigned char.
- Assuming that char is always unsigned or signed can lead to
  compile-time and run-time errors.

You can also use int8_t, but then it would be less obvious for developers
to never assume that char is always unsigned (or always signed).

Conflicts:

	components/esm/loadcell.hpp
12 years ago
Emanuel Guevel 0b7d11d38d to_utf8 test: fix Utf8Encoder constructor 12 years ago
Emanuel Guevel 63f09462fd to_utf8, Utf8Encoder: pass encoding as constructor parameter
Edit other files accordingly.
12 years ago
Emanuel Guevel cc792da858 Fix to_utf8 test: add test data directory and remove unused include 12 years ago
Emanuel Guevel c947d87ab9 Add a test for to_utf8 component 12 years ago
Emanuel Guevel 0bdf52a071 components/to_utf8: keep only Utf8Encoder 12 years ago
Emanuel Guevel 740e2b5769 components/to_utf8: add class Utf8Encoder 12 years ago
Marc Zinnschlag 2d468fec02 made previous commits naming standard compliant 12 years ago
lazydev 74ae479780 Cell names localization fix 12 years ago
greye 7368e7b655 rename getASCII() to getLegacyEnc() 12 years ago
greye 7606ebafd6 resolving conflicts, minor update 12 years ago
Michael Mc Donnell eff2799c1b Update UTF 8 table generator to print char values
This patch is in relation to commit 25fa8165f97 (Use char literals in
UTF 8 conversion to fix 798 warnings), which changed the UTF 8 table
to have char integer values instead of unsigned chars. Those values were
converted using a custom Python script. This patch changes the original
table generator so it can now output the same format.
13 years ago
Michael Mc Donnell 5fa8165f97 Use char literals in UTF 8 conversion to fix 798 warnings
The data type is specified as char but the literals are unsigned char. This
results in 798 truncation warnings in vs2010. The literals were converted
with a simple python script to signed char while taking two's complement and
the overflow into account.

Also tested on Ubuntu 12.04 with gcc 4.6.
13 years ago
guidoj a021165d9f Changed standard C lib includes to C++ format 13 years ago
Alexander "Ace" Olofsson b1af18e98d Merged next 13 years ago
Alexander "Ace" Olofsson a74aeace73 Can now save strings with proper encoding, byte-perfect clones up until land records 13 years ago
Lukasz Gromanowski e21e8c221d Added explicit cast to char in ToUTF8::windows_XXXX tables.
Added explicit cast to char, without that gcc 4.7 (with default settings)
is showing a lot of:

narrowing conversion of ‘...’ from ‘int’ to ‘char’ inside { } is ill-formed in C++11 [-Wnarrowing]

warnings.
13 years ago
Lukasz Gromanowski ac9b1715d5 Added new command line option: "encoding"
Added new command line option: "encoding" which allow to
change font encoding used in game messages.

Currently there are three evailable encodings:

    win1250 - Central and Eastern European (languages
              that use Latin script, such as Polish,
              Czech, Slovak, Hungarian, Slovene, Bosnian,
              Croatian, Serbian (Latin script),
              Romanian and Albanian)

    win1251 - languages that use the Cyrillic alphabet
              such as Russian, Bulgarian, Serbian Cyrillic
              and others

    win1252 - Western European (Latin) - default

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
14 years ago
Lukasz Gromanowski 57972eb042 Mantis: #18 - Move components from global namespace into their own namespace.
Added namespace around generated win_1252 table.
Added generation of header guard and ToUTF8 namespace in gen_iconv.
Small corrections in Makefile.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
14 years ago
Nicolay Korslund 71e5a15298 Minor improvement to to_utf8 14 years ago
Nicolay Korslund 38ad2d98f9 Fixed windows issues + one minor optimization on to_utf8 15 years ago
Nicolay Korslund 358e1ca5a5 Added custom UTF8 converter. Removed iconv dependency. 15 years ago