• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

convert a string to its unicode representation

Guest
Oct 31, 2007 Oct 31, 2007

Copy link to clipboard

Copied

how can I convert characters such as "ащщ" to their unicode numbers (1072,1097,1097)? I know it's gotta be so easy, but it's going over my head.
TOPICS
Advanced techniques

Views

511

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Deleted User
Nov 01, 2007 Nov 01, 2007
I knew it had to be that simple!!!

anyways, this has been plaguing me for a few days now, but I put together this udf, for anyone who has the same problems

Votes

Translate

Translate
LEGEND ,
Nov 01, 2007 Nov 01, 2007

Copy link to clipboard

Copied

ogre11 wrote:
> how can I convert characters such as "???" to their unicode numbers
> (1072,1097,1097)? I know it's gotta be so easy, but it's going over my head.

as long as you're on mx, asc() should return the codepoint for any char.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 01, 2007 Nov 01, 2007

Copy link to clipboard

Copied

I knew it had to be that simple!!!

anyways, this has been plaguing me for a few days now, but I put together this udf, for anyone who has the same problems

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 01, 2007 Nov 01, 2007

Copy link to clipboard

Copied

ogre11 wrote:
> when I give any Cyrillic character to a cf function it gets converted into a
> question mark at some point before the function runs so asc returns 63 on all
> cyrillic characters

encoding issue. where's the data coming from? if db, which one? what driver? is
the data really unicode?

do you have a simple example showing the problem?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 02, 2007 Nov 02, 2007

Copy link to clipboard

Copied

the question marks were being caused by dreamweaver. it was a backend cfm script so there was no meta tag, so dreamweaver was probably saving it as iso-5589-1, when I put in a metatag charset="utf-8" and then saved closed opened it worked.

Anyways, solution above. Thanks for your help!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 02, 2007 Nov 02, 2007

Copy link to clipboard

Copied

LATEST
ogre11 wrote:
> the question marks were being caused by dreamweaver. it was a backend cfm
> script so there was no meta tag, so dreamweaver was probably saving it as
> iso-5589-1, when I put in a metatag charset="utf-8" and then saved closed
> opened it worked.

a BOM would be a better choice if dreamweaver supports it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation