mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 02:26:38 +00:00 
			
		
		
		
	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>
		
	
			
		
			
				
	
	
		
			26 lines
		
	
	
	
		
			667 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
	
		
			667 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #ifndef COMPONENTS_TOUTF8_H
 | |
| #define COMPONENTS_TOUTF8_H
 | |
| 
 | |
| #include <string>
 | |
| 
 | |
| namespace ToUTF8
 | |
| {
 | |
|   // These are all the currently supported code pages
 | |
|   enum FromType
 | |
|     {
 | |
|       WINDOWS_1250,      // Central ane Eastern European languages
 | |
|       WINDOWS_1251,      // Cyrillic languages
 | |
|       WINDOWS_1252       // Used by English version of Morrowind (and
 | |
|                          // probably others)
 | |
|     };
 | |
| 
 | |
|   // Return a writable buffer of at least 'size' bytes. The buffer
 | |
|   // does not have to be freed.
 | |
|   char* getBuffer(int size);
 | |
| 
 | |
|   // Convert the previously written buffer to UTF8 from the given code
 | |
|   // page.
 | |
|   std::string getUtf8(FromType from);
 | |
| }
 | |
| 
 | |
| #endif
 |