Jump to content

Recommended Posts

Posted

Does anyone know a way to detect the encoding of a string, whether ASCII/ANSI/UTF-8/UTF-16/UTF-32?

I would like to do something like FileGetEncoding() but with a string value instead of a file.

Posted

Pointing to a 7-year old thread clearly claimed pointless isn't going to help, rather add to confusion.

willichan,

All AutoIt strings are using UCS-2 encoding, which is the most useful subset of UTF16 also known as BMP-0.

  Reveal hidden contents

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Posted

You probably need something to compare it to which is "meaningfull".  Any random array of bytes can be represented as single or double bytes, and same array of bytes can be represented in many ways depending on ansi encoding you choose. Example:

ÿÿ in Western ansi is same as яя in Cyrillic ansi. But same bytes. And яя in UTF8 will be meaningless represented in ansi - but is still legal ansi.

  Reveal hidden contents

I am just a hobby programmer, and nothing great to publish right now.

Posted (edited)

look for @Lazycat UDFs

http://autoit.darkhost.ru/udfs.html

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)
  On 11/19/2013 at 8:21 AM, jchd said:

All AutoIt strings are using UCS-2 encoding, which is the most useful subset of UTF16 also known as BMP-0.

I guess that explains why so many of my scripts seem to be failing for my Japanese users.  Is there any way around this?

  On 11/22/2013 at 8:32 PM, mlipok said:

look for @LazyCat UDFs

That is the FileGetEncoding function I was referring to in the OP.  Given what jchd said, I think I know now why I was not able to re-tool it to work with user entered data.

--- Edit ---

@jchd:  Never mind.  I feel silly.  I needed to be using AscW and ChrW, and don't need to worry about the encoding.  I just need to account for the unicode alpha-numerics (like full width vs. half width alpha-numerics used in Japanese), and that is a simple one.

Edited by willichan
Posted

Good that you got it working. I don't believe that the restriction from UTF16 to UCS-2 would be an issue for everyday's Japanese.

  Reveal hidden contents

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

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
  • Recently Browsing   0 members

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