LibreOffice Module unotools (master) 1
Functions
wincodepage.hxx File Reference
#include <unotools/unotoolsdllapi.h>
#include <rtl/textenc.h>
#include <rtl/ustring.hxx>
Include dependency graph for wincodepage.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

UNOTOOLS_DLLPUBLIC rtl_TextEncoding utl_getWinTextEncodingFromLangStr (const OUString &sLanguage, bool bOEM=false)
 Map from an ISO-639 language code (and optionally ISO-3166 country/region code) to a text encoding of corresponding Windows ANSI or OEM codepage. More...
 

Function Documentation

◆ utl_getWinTextEncodingFromLangStr()

UNOTOOLS_DLLPUBLIC rtl_TextEncoding utl_getWinTextEncodingFromLangStr ( const OUString &  sLanguage,
bool  bOEM = false 
)

Map from an ISO-639 language code (and optionally ISO-3166 country/region code) to a text encoding of corresponding Windows ANSI or OEM codepage.

Parameters
sLanguageAny language-country string. Must not be null.
bOEMIf true, OEM codepage is returned, otherwise ANSI.
Returns
The corresponding rtl_TextEncoding value. If no mapping is found, RTL_TEXTENCODING_IBM_850 is returned when bOEM is true, RTL_TEXTENCODING_MS_1252 otherwise.

Definition at line 134 of file wincodepage.cxx.