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

CFML query update database poland character

Community Beginner ,
Aug 23, 2016 Aug 23, 2016

Copy link to clipboard

Copied

Hi All,

if i update my database mysql, the character not correct update in the database:

update mitarbeiter

set vorname = 'Gdańsk'

where id = '1604'

In the database stand: Gda?sk

The character encoding on the site seems ok.

in HTML it shows:

Gdańsk

does anybody knows the problem ?

thanks

thorsten

Views

847

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

Community Beginner , Aug 23, 2016 Aug 23, 2016

Hi,

i have solved the problem on visitenkarten.com

the solution is very simple.

in the coldfusion administrator i insert the connection string in the database:

useUnicode=true&characterEncoding=utf8

in the database fields it is important that the fields are

character set: utf8

and  the collation: utf8_gereral_ci

now it works.

greetings thorsten

Votes

Translate

Translate
LEGEND ,
Aug 23, 2016 Aug 23, 2016

Copy link to clipboard

Copied

If you are going to use characters like that, you need to change the datatype of the column.  I'm assuming you set it for varchar; change it to nvarchar, re-do the update and see if that fixes it.

HTH,

^_^

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
Community Beginner ,
Aug 23, 2016 Aug 23, 2016

Copy link to clipboard

Copied

Hi,

if i insert it on command line.

the characters are correct.

only if i insert it via web site..

the characters are damaged.

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 ,
Aug 23, 2016 Aug 23, 2016

Copy link to clipboard

Copied

If you are getting the erroneous character replacement by submitting it via a web page, browsers are (by default) set for UTF-8 encoding.

http://dba.stackexchange.com/questions/140018/special-characters-in-mysql-using-utf8-unicode-collati...

HTH,

^_^

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
Community Beginner ,
Aug 23, 2016 Aug 23, 2016

Copy link to clipboard

Copied

Not correct.

The output on my screen is in the image.

but the characters are not in the database.

in the database is "Gda?sk4"

"

Bildschirmfoto 2016-08-23 um 16.53.17.png

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
Community Beginner ,
Aug 23, 2016 Aug 23, 2016

Copy link to clipboard

Copied

it seems that the cfquery dont use the correct characters...

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
Advocate ,
Aug 23, 2016 Aug 23, 2016

Copy link to clipboard

Copied

Are you using cfqueryparam? Is the field data type nvarchar? You can also check to see if the string format option is ticked in the datasource setup in CF admin.

String Format - Enable High ASCII characters and Unicode for data sources configured for non-Latin characters

Also is your sql db charset UTF8?

Also see ColdFusion - Inserting arabic/persian characters to mysql - Stack Overflow

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
Community Beginner ,
Aug 23, 2016 Aug 23, 2016

Copy link to clipboard

Copied

LATEST

Hi,

i have solved the problem on visitenkarten.com

the solution is very simple.

in the coldfusion administrator i insert the connection string in the database:

useUnicode=true&characterEncoding=utf8

in the database fields it is important that the fields are

character set: utf8

and  the collation: utf8_gereral_ci

now it works.

greetings thorsten

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