GuessJapaneseEncoding

From Xojo Documentation
Jump to: navigation, search
Method

Guesses the text encoding used for a sample of Japanese text (2022_JP, EUC, S-JIS, or plain US_ASCII). If it is given a string whose encoding is already known, it returns that encoding. If the encoding is unknown, it assumes the encoding is some Japanese script, and attempts to guess which one.

Syntax

result=GuessJapaneseEncoding (text)

Part Type Description
result TextEncoding The guessed TextEncoding.
text String The text whose text encoding will be guessed.

Example

This example is in the Open event of a TextField.

Dim t As TextEncoding
t = GuessJapaneseEncoding("テスト文字列")
Me.Text = Str(t.Base)

See Also

ConvertEncoding, DefineEncoding, Encoding functions; TextEncoding class, Encodings module.

Personal tools
Namespaces

Variants
Actions
Main
Content
Starting Out
Dig Deeper
More Help
Toolbox
About