Forums / General Questions / Special Characters in DB

Special Characters in DB

Views: 1,725

Results 1 to 8 of 8
29 Jun 2011, 11:09 PM
#1
weljkodj avatar

weljkodj

New Zenner

Join Date:
Oct 2010
Posts:
34
Plugin Contributions:
0

Special Characters in DB

Hello,

Is there a way I can store characters like š-đ-č-ć-ž in database and still be able to display them on frontpage or admin panel?
For example in products name and description?

I have changed complete database and tables collation to utf8_general_ci and still dont see any changes.

I know I can display those characters by typing HTML codes instead. But I need more elegant and worryless solution.

Thanks in advance.

30 Jun 2011, 12:34 AM
#2
coolcarpartsonline avatar

coolcarpartsonline

Totally Zenned

Join Date:
Feb 2008
Posts:
1,386
Plugin Contributions:
0

Re: Special Characters in DB

You have to change the page encoding to match the database fields encoding.

I am not familiar with that language so I don't know which encoding would work best for such case.

30 Jun 2011, 12:43 PM
#3
weljkodj avatar

weljkodj

New Zenner

Join Date:
Oct 2010
Posts:
34
Plugin Contributions:
0

Re: Special Characters in DB

This language is eastern european latin, UTF-8 has all of those characters. I have changed @setlocale to "sr_YU.UTF-8" but this doesnt solve the problem.

I have checked how wordpress works, db and all tables are utf8_general_ci, and if you type some of those characters directly from phpmyadmin, they will be displayed fine. But if I do it in ZC, I get something like this: �???�. Or you can see it in action for yourself inside description: http://sportak.rs/zenner/torbe/shoulderbags/eastpak-the-one-shuffling-stars

30 Jun 2011, 1:53 PM
#4
weljkodj avatar

weljkodj

New Zenner

Join Date:
Oct 2010
Posts:
34
Plugin Contributions:
0

Re: Special Characters in DB

I realized that the problem is between DB and application. All my language defines in PHP are displayed properly, but if it takes text from db then I get those diamond shaped characters.???

30 Jun 2011, 1:55 PM
#5
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,684
Plugin Contributions:
0

Re: Special Characters in DB

Are you using an HTML editor to style your description from the Admin?

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

30 Jun 2011, 2:11 PM
#6
weljkodj avatar

weljkodj

New Zenner

Join Date:
Oct 2010
Posts:
34
Plugin Contributions:
0

Re: Special Characters in DB

I know I can make it via HTML editor. That is not the problem. Sometimes I need to import bulk products with their description (with those special characters) and the only way I can do that is by using EasyPopulate or make direct import to DB.

Now I tried to edit product description via ZC HTML editor and as a result I've got in DB something like this: šđčćž, while on webpage is displayed properly.

30 Jun 2011, 2:19 PM
#7
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,684
Plugin Contributions:
0

Re: Special Characters in DB

So - you are using Easy Populate to upload the descriptions?

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

30 Jun 2011, 2:29 PM
#8
weljkodj avatar

weljkodj

New Zenner

Join Date:
Oct 2010
Posts:
34
Plugin Contributions:
0

Re: Special Characters in DB

Not just EasyPopulate. Also direct db import is a problem.