Jump to content

Ansi <=> Oem String Conversion


Djé
 Share

Recommended Posts

I haven't found any built-in function in AutoIt nor UDF on this forum to convert strings between OEM and ASCII code page.

And I don't know about the windows API which could do it.

The OEM code page is the one used by the command prompt and batch files, and the ANSI one is your normal windows one. The difference are with characters having codes > 127 (non-ASCII or extended ASCII).

So here are some UDFs of my own to do so.

Code pages used are those of your system.

If you're in western europe, it should be OEM=850 & ANSI=1252.

It works using the CHCP command, by writing and reading to a command prompt using StdinWrite and StdoutRead. So you'll need a good beta to compile it.

Enjoy!

[Edit]: simplified the 'simple' function :)

ANSI_OEM_ANSI.au3

Edited by Djé
Link to comment
Share on other sites

It works although i don't need it. Not bad for one of your first few posts

My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...