miCRoSCoPiC^eaRthLinG
Feb 22 2007, 05:20 PM
Hey guys, I've been working on a AJAX based CMS for a client for the last few days and am in the final stages of deployment. I've run into a slight problem here. The site is supposed to be in Norwegian. The back-end uses the tinyMCE editor for adding in content, which is stored in MySQL. Now this presents no problem at all and the content is displayed just fine in the browser..
Problem arises when it comes to the site menu. It is a drop-down menu script from DynamicDrive, which reads off the menu items the same way from MySQL as the content and builds up the menus dynamically.. this is where it's messing up. The Norwegian characters in the menus are not being displayed properly.. in most cases, you can see that ugly "?" which turn up when your browser / page-encoding doesn't cover the displayed character set.
Now it can't be a problem with MySQL coz all these fields are declare utf8_general_ci. Also when I send in the page headers, I made sure to send in.. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
.. so that the page encoding is set right.
What baffles me is WHY the content should appear fine and NOT the menu items !! You can take a look at the demo site here: http://gaute.chaos-laboratory.com
Any ideas how to fix this?
Cheers, m^e
Reply
pyost
Feb 22 2007, 08:19 PM
If it's the same thing I had to deal with a few months ago, then it is a MySQL issue (but not a problem). You can read more about this here. Anyway, one of the solutions to this problem is to run this query every time you open a MySQL connection: CODE SET NAMES 'utf8' Ugh.. Actually.. If the content appears OK, but the rest doesn't..  I might be wrong, but do give it a shot.
Reply
mastercomputers
Feb 23 2007, 02:26 PM
Well changing the encoding to Western ISO shows it correct, which suggests that's the encoding being used for the menu. Maybe part of the site, grabs ISO encoded data, that needs to be converted to Unicode, or you need to make sure each page, including external scripts be UTF-8 encoded when saved. Most editors should be capable of doing that, if not, then I don't think you should use those editors. Javascript works on UTF-16, so it's output should be fine, it could screw up with it's content it grabs though. I can't really dive too much into all this, I'm tired as anything, just got home, so hopefully you can sort it. Cheers, MC
Reply
miCRoSCoPiC^eaRthLinG
Feb 26 2007, 08:10 AM
Was away for a coupla days.. just came back Let me work on the ideas you guys have suggested and see if I can spot the problem.. Regards, m^e
Reply
vhortex
Feb 26 2007, 03:56 PM
QUOTE(miCRoSCoPiC^eaRthLinG @ Feb 23 2007, 01:20 AM)  Hey guys, Problem arises when it comes to the site menu. It is a drop-down menu script from DynamicDrive, which reads off the menu items the same way from MySQL as the content and builds up the menus dynamically.. this is where it's messing up. The Norwegian characters in the menus are not being displayed properly.. in most cases, you can see that ugly "?" which turn up when your browser / page-encoding doesn't cover the displayed character set.
Cheers, m^e
m^e! are those menus being pulled from the database by using an ajax call? if they do you need to tell ajax to return the data in utf8 or utf16 format, i go with utf8.. it seems that the encoding of the menu was western ISO as given by the post above this. i use to have that problem too then i explicitly told ajax to parse the data as utf8 since i am storing them as utf8_general_ci... in cases i forget to tell the ajax script about the encoding, i get the swedish charset which is the default on my server and my special chars turn into chunks of ?.. did you check the colation also in the mySQL database that the columns that holds the menu data are indeed set to utf8, i made this mistakes and mySQL uses the default charset.
Reply
Recent Queries:--
javascript unicode-encoded - 186.76 hr back. (1)
Similar Topics
Keywords : unicode, encoded, site, characters, displaying, properly,
- Website Navigation Hover Buttons Stick So Made Css Today
need further help with tutorial from this site (7)
Stretching My Site Vertically
Using CSS or HTML (6) I know it's possible, I've seen it one time. But I forgot. Many websites, if they hold more
content than there is room for in the minimum height, the site stretches vertically. How can I do
this? I only know that I need a background image of 1px height. Thanks in advance MediYama....
Cvs For Maintaining Your Site
(0) This is something every webmaster would love to use.. but didn't know existed. There is a tool
named "CVS" which can be used to save all versions of your program. You initially start with a set
of source code files, and the project grows from there on. If you make a mistake you can always
restore the changes you made from the previous version you added to the "CVS". During a
website's lifetime, a lot of code keeps changing, and more often than not, some code causes a
problem in the rest of your website. Using CVS would help to detect where you slipped in those ....
Need Help With Multi-lingual Site Design
(6) Does any of you have any ideas on multi-lingual site design? I'm looking for some
resources/guides that'll show me the exact technique of achieving this... I am NOT looking for
the Google Translate kind of option, where you've got a bunch of buttons on your site - clicking
on which, will pass your page through Google Translator producing a totally garbled grammatical
output in another language... What I want is to define every Text Element on the site as
variables and depending on the lanugage of your choice, these variables are filled in from
pre-defin....
Thinking About An "audio" Web Site
Your feedback please (4) Our company is in the web development (and marketing) business. This winter we are re-developing
our own site, and I have been thinking of making the web site also available as an audio option.
Since I'm an audio learner this concept interests me, and I figured I would throw this idea to
you guys for you opinions / feedback etc. as I don't like to act on something without first
getting feedback from people. I have the right recording gear to make the files sound good, so
there's no problem there. And I would still do the usual "TEXT" in particular the sea....
Help Choose A New Banner For Me Please
Help needed to choose a new banner for my site (11) Ok yesterday we got busy and spent some time making some new banners for The Sounds Of The Suburbs
site. We haev can for sort of an urban decay theme on the site..and were going to totally remodel
it this week to different feel and maybe even get the databases working /wink.gif"
style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> So can you take a look at the
images below and post which one you feel is the best one.. Your views will help us hopefully decide
on the new banner Banner 1 Banner 2 Banner 3 Banner 4 Banner 5 Banner 6....
How Do I Keep A Background On My Site
(14) I had a background on my site that i got on the internet. I don't remember the name of the site
but from it I was able to save the background (which was a textured blue background) to
photobucket.com. I've had it there for awhile, but now, all-of-the-sudden it disappeared. I
guess you can only keep things on photobucket for so long. But how do I keep a background on my
site if I can't host it somewhere? Is there a way to put the picture in cPanel and use it from
there? If there is, I cant figure it out.....
With Or Without Tabs?
help me choose design for my site. (15) As I run this website for more than a 1 year now, Im getting more and more visitors, I have a
feeling that navigation on my page isn't such great as it seems on the beggining. I tried to
navigate like first-time user, and have trouble finding information that I was looking for. So, I
have an idea, to integrate basic types of information on 4 main TABs at the top of page. Look at
the two pictures and tell me which one is better: the one with the tabs, or the one without.
The above picture is new version, with tabs... The above picture is current look ....
How To Display XX Users Online On Your Site ?
(5) i've seen many sites around the net that have something on their page that says like 348 users
online... does anyone here know how that is done and could help with this issue.... like i wish to
record the number on users on all my 525 pages on my site and add them all together into 1 number
that i show on the front page of my site (not just the ppl viewing that 1 page).... if anybody could
help i'd be very thankful thank you!....
How Can You Spice Up Your Basic HTML Site ? Beginner Needs Help
(9) Well im new to this,and i know a person who knows how to do HTML,I of course dont lol,but I was
wondering with html can you change the way the sites you make on here look and ect..(put flash in
and w/e..)....
Redirecting All Htm Files To Php Site...
(8) Hi, just finished converting all my files from .HTM to .PHP files. Is there an easy way to redirect
all my users who go to the .HTM pages to the .PHP pages instead? Basically all the names remained
the same. Just the extension changed. My webhost has cPanel 10. something... Thanks.....
Embeding Font Files
How To Embed Fonts To Your Site (1) A lot of web designers run into the same problem of wanting a certain font type, but the question
comes up "How do I guarentee the font to show up without the viewer's computer to install the
font on the computer?" it's easy, just follow these steps. The first thing you have to do is
download and install Weft 3 from microsoft, it's free, the download link is on that page. the
easiest way you can embed a font is by using the wizard and follow the steps commanded to you.
Easy, but what if you really want to know how the program works, or don't want to....
Good Site To Download Web Templates ?
(21) could anyone recommend a place to download (preferably free (as im not sure i can make it work))
some (or a) good web template(s), something easy to use and not too complicated! thanks chris p.s
just needs a couple pages of text (preferably with some graphics which i can change), some contact
info and links to galleries which i have already made.....
Free Shoutbox For Your Web-site
And a cool one at that ;) (12) Hi guys, Those who want to avoid the extensive process of setting up a shoutbox on your own
web-site (messing around with a whole bunch of PHP Code and MySQL Databases in the process) - can
grab one for FREE rightaway from YellBox. I found out about their site a couple of hours back -
and it's looks real good. Check out: http://yellbox.com Here's a list of their features:
QUOTE * Instant feedback from visitors you would not hear otherwise. * Allow your
visitors to communicate or help each other. * Greater sense of community will keep visit....
Programing My Site
(4) Hey, I just got hosting and I need help to program my site. How do I get a forum program on the
front of my site. I cant change the design or anything. Can some1 please help me. THAnks
jrdonjar0591 Edit -> Moved topic to more suitable location (Webdesign and HTML in the design
category) -- Moon....
Find Out Dead Links In Your Site Automatically
Want to see a dead link on your site? (11) If you try to go to http://www.dead-links.com you will be asked for your domain or url. Enter it
and the bot will find any dead links that you might not have seen. Have a nice day.......
How Do You Put Flash Into Your Site?
Help plz... (7) Hi, im makin a games site for Tasty Relish Forum. (go here to join and help fill this forum!!!)
how do I embedd flash games?....
Get Afree Template For Your Site
(3) there is some site whic give u free html templates wich can be so easy to u to design ur own site
lets share it to find the best i will add the sites i use effex media
http://www.templatesweb.com/ ....
What Is The Best Language For Web Site ?
What is the best language for web site ? (23) Which is the best language, for a web site ? Topic moved, this suits better here, in the
design/websites forum /wink.gif' border='0' style='vertical-align:middle' alt='wink.gif' /> --
MoonWitch Moved again. Out of Howto's and Tutorials into Designing > Web Design. ....
Wap Sites
Do you have a WAP site? (4) Do any of you guys have a WAP site or has an interest in making one? How many of you have used a
wap browser or even used your cell phone to access a wap site? I know some people don’t care about
cell phones other that to make call, but the technology is here to stay. Like computers the cell
phone will be integrated with every aspect of communication and is constantly expanding. The WAP
protocol is the leading standard for information services on wireless terminals like digital mobile
phones and Personal Digital Assistants (PDAs). WML is the language used to create p....
Web Site Trackers?
(8) Hi guys! I need for my site a kind of a tracker, that will show me how many peoples enetred my
sites, what pages they view, where are they come from? I need detailed information on my visitors!
is there any such a service for free? plz help!thanks!....
Why A Site Is Viewed Differently In Browsers
(12) hi guys! I have a real big problem... I have made my site, and in explorer it is viewd perfectly!
When I loaded it on Mozilla Firefox, the first page looks like in explorer, but others are so ugly!
a cell from the table is moving much more to the right!!! what can I do? Why is so? does it help
visitors, if I write: best view: internet explorer ? thanks!....
Weather Feed Script In Php
A good weather feed on your site (0) If you are tired of providing your clients with weather feeds that take visitors off of their site
or slam their site with ads, I finally found one after searching for hours. Here's a link to a
FREE php script that pulls the feed directly from any airport in the world to your site. It is easy
to customize and has simple, well documented installation instructions.
http://www.mattsscripts.co.uk/mweather.htm hope you find it helpful... a good one for designers
to archive as you will most likely need it some day for a client. Check out Matt's other free
scri....
Website Review
Please Review this simplistic site (11) I just posted a simple designer site, you comments would be appreciated.
http://www.pbolduc.astahost.com Please feel free to critique any of the completed sites as well.
Also would like your opinion on the header of this site under construction (load time)
http://www.pbolduc.astahost.com/protectSoftware/index.php The links are broken coming off the
page. Thanks, pete....
All Images Don't Show Up When Published!
Site looks OK when previed on computer (7) First attempt to publish the site didn't work to good. /sad.gif' border='0'
style='vertical-align:middle' alt='sad.gif' /> I have all the images used to test in /images/
folder and it's my first attempt on using CSS so it may be botched on the css level /wink.gif'
border='0' style='vertical-align:middle' alt='wink.gif' /> My CSS file are here at: style.css . I
created a index.html file and uploaded it together with all the images used. In the #header part 1
image show up but not the other (second image show not the first). Background image does not show ....
Add A Search Box To My Web Site
how to? (10) I don't know If this topic I should post here, but I'll try! I have a web site and i really
need to add to my website a feature like searching on the site!I need a simple text boxt and a
button, that will search the site content! are there already done version of such programs? pleasee
help! thanks you!....
Free Templates
Great site! (3) I found a website with all free web and flash templates! They're really cool! I have 3 of them
ready to install now! Just go to www.notemplates.com and sign-up free and download as many as you
want! They offer only free templates in many genres! I like them a lot because the templates look
really professional and they're free!....
Site Designing
(21) Do any of you guys have a particular process you go through when designing a site? I always find it
really hard to get started on a site, and often have to have 4 or 5 gos before I get it right. Is
there a "perfect formula" out there for getting your designs right every time?....
Help me
I want to make site to the linux beginer (3) Please help me, give me ideas. I want to create a place to help to all the persons that want to
learn linux. I have ideas but I now you have better ideas. My main idea is to show that everything
that is done in windows can be done in linux. As see movies, play music and create sites webs.....
Music On My Site?
(18) Does enyone know how to add background music to your webpage? Can you do it using html???
/mellow.gif' border='0' style='vertical-align:middle' alt='mellow.gif' /> Moved to Designing >
Web & HTML . Absolutely wrong forum. ....
Looking for unicode, encoded, site, characters, displaying, properly,
|
*SIMILAR VIDEOS*
Searching Video's for unicode, encoded, site, characters, displaying, properly,
|
advertisement
|
|