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

Annoying characters

Participant ,
Sep 18, 2008 Sep 18, 2008
Does anyone know how to avoid characters like this ’ getting inserted into the db and output to the screen? In my app I disable bad characters and set everything to UTF-8 but somehow I still end up with this junk. Is there something I can do in my form to kill it on the way into the db? I am using cf7.
509
Translate
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 ,
Sep 18, 2008 Sep 18, 2008
I'll be the first annoying character to attempt an answer.

Step 1 - decide what you want to do if you encounter any.
Step 2 - implement that decision.
Translate
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
Participant ,
Sep 18, 2008 Sep 18, 2008
Dan... that was bad. 🙂 Usually your responses are useful. What I did was disable anything I didn't want in the db using this....

<!--- Disable crap characters --->
<cfquery name="disable" datasource="flyfishingcom">
SET CHARACTER SET utf8;
</cfquery>


But somehow things are still getting output poorly. Single quotes are usually the culprit.
Translate
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
Participant ,
Sep 18, 2008 Sep 18, 2008
Hi,
You would see this kind of problems when your application is not 100% UTF-8.
Do you have special characters like German umlaut or Chinese that get inserted into the DB correctly?

you can always browser to yahoo.de to get some special characters to test your application.

cheers,
fober

Translate
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 ,
Sep 18, 2008 Sep 18, 2008
idesdema wrote:
> Does anyone know how to avoid characters like this ??? getting inserted into

the "technical" term for that is mojibake ;-)

> the db and output to the screen? In my app I disable bad characters and set
> everything to UTF-8 but somehow I still end up with this junk. Is there

obviously not all utf-8. got a public page we can see that shows this issue?
simple code example? what db? what db driver? got both setup right for unicode?
Translate
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
Participant ,
Sep 19, 2008 Sep 19, 2008
LATEST
Well I looked into the database side and I thought I had it solved when the default database character set was utf-8. However, each table in MySQL has to have a character set so I went through each one (and each text row) and set those to utf-8. Perhaps this will solve it.

Now if there were a way to find and replace the existing mojibake...
Translate
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