ApplyCodepage - script and chart function
ApplyCodepage() applies a different code page character set to the field or text stated in the expression. The codepage argument must be in number format.
Syntax:
ApplyCodepage(text, codepage)
Return data type: string
Argument | Description |
---|---|
text | Field or text to which you want to apply a different code page, given by the argument codepage. |
codepage | Number representing the code page to be applied to the field or expression given by text. |
Example | Result |
---|---|
LOAD ApplyCodepage(ROWX,1253) as GreekProduct, ApplyCodepage (ROWY, 1255) as HebrewProduct, ApplyCodepage (ROWZ, 65001) as EnglishProduct; SQL SELECT ROWX, ROWY, ROWZ From Products; |
When loading from SQL the source might have a mixture of different character sets: Cyrillic, Hebrew, and so on, from the UTF-8 format. These would be required to be loaded row by row, applying a different code page for each row.
The codepage value 1253 represents Windows Greek character set, the value 1255 represents Hebrew, and the value 65001 represents standard Latin UTF-8 characters. |