ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / String functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Converts an OEM string (DOS) to an ANSI string (Windows). Accented characters are different in both standards. The conversion consists in modifying the accented characters.
Reminder:
  • ANSI is the character set used in Windows.
  • OEM is the character set used in DOS (or Windows console).
New in version 2025
WEBDEV - Browser code This function is now available in browser code.
Example
MaChaîne1 is string
MaChaîne1 = Charact(130) + "t" + Charact(130)  // "été" en OEM
Info(OemToAnsi(MaChaîne1))
// Affiche "été" en ANSI dans la fenêtre d'information Windows
Syntax
<Result> = OemToAnsi(<OEM character string>)
<Result>: ANSI character string
Character string in ANSI format.
<OEM character string>: Character string
OEM string format to be converted.
Remarks
  • OemToAnsi does not convert characters with an ASCII code between 0 and 31 (control characters).
  • Caution: Do not use the OemToAnsi function with a string containing ANSI-specific characters (accented characters): these characters will be transformed and the result will be incorrect.
Business / UI classification: Neutral code
Component: wd300vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Mobile
PARA RESOLVER PROBLEMAS DE ACENTUAÇÃO

Prezados,

Caso de problema com acentuação, use:

retorno is string = UFT8toString(textocomacento)

USE O COMANDO UTF8ToString OU AnsiToUnicode


Procedure WS_Android_IOS_HTTPGetResult()

// Variable
bufResHTTP is Buffer
sHTTPResult is string

// Retrieves the result of the query

bufResHTTP=HTTPGetResult(httpResult)

// Result in UTF8 em iOS Apple

If IniOSMode() =True OR IniOSSimulatorMode() =True OR IniOSEmulatorMode() =True

IF StringCount(bufResHTTP, “ISO-8859-1”,IgnoreCase) =0

sHTTPResult=UTF8ToString(bufResHTTP)

ELSE

sHTTPResult=AnsiToUnicode(bufResHTTP)

END

ELSE IF inAndroidMode() =True OR InAndroidSimulatorMode() =True OR InAndroidEmulatorMode() =True

// Result in Android

sHTTPResult=bufResHTTP

END

RESULT sHTTPResult
Boller
27 Mar. 2024

Last update: 09/24/2024

Send a report | Local help