Welcome Guest!

If you do not have an account yet on The Web Squeeze forums, please Register! It’s FREE and there are many benefits:

  • Receive Fast Advice
  • Learn Programming Languages
  • Get Professional Website Reviews
  • Quick Troubleshooting Assistance

> Codeigniter Encoding

This is a discussion on Codeigniter Encoding, within the PHP section. This forum and the thread "Codeigniter Encoding" are both part of the Frameworks category.

 
Reply to this topicStart new topic
> Codeigniter Encoding
Antti
post Aug 3 2008, 04:22 AM
Post #1


Rapid Squeezer
Group Icon

Posts: 308
Joined: 15-February 08
From: Finland


I'm having a bit of problem when querying text from mysql with scandinavian characters (ä/ö). I get the results all messed up. Before it has been enough when I set the page chacter encoding to iso-8859-1 but now it doesn't work. I've also set the encoding in CI to that too but it didn't make no difference. Does anyone have any idea where to start looking the problem?


--------------------
Go to the top of the page
 
+Quote Post
Jason
post Aug 3 2008, 01:14 PM
Post #2


Master of the Universe
Group Icon

Posts: 1,298
Joined: 15-February 08
From: London, England


Do you have a link?

Can you confirm that the problem is occuring when a page is being displayed and not in the process of saving characters to the database.


--------------------
Go to the top of the page
 
+Quote Post
Antti
post Aug 4 2008, 12:15 AM
Post #3


Rapid Squeezer
Group Icon

Posts: 308
Joined: 15-February 08
From: Finland


I'll try to get you an example page at least in the form of screenshot. The characters show perfectly fine when I view them in phpmyadmin so I guess they are ok in database.


--------------------
Go to the top of the page
 
+Quote Post
Jason
post Aug 4 2008, 02:49 AM
Post #4


Master of the Universe
Group Icon

Posts: 1,298
Joined: 15-February 08
From: London, England


Could you post the source code. Render the page then copy the source.


--------------------
Go to the top of the page
 
+Quote Post
Antti
post Aug 4 2008, 11:03 AM
Post #5


Rapid Squeezer
Group Icon

Posts: 308
Joined: 15-February 08
From: Finland


The part where all goes wrong:
CODE
Sivusto avattiin tänään 1.8.2008!

Encoding I have like
CODE
<meta http-equiv="content-type" content="application/xhtml+xml; charset=iso-8859-1" />


--------------------
Go to the top of the page
 
+Quote Post
Antti
post Aug 4 2008, 11:14 AM
Post #6


Rapid Squeezer
Group Icon

Posts: 308
Joined: 15-February 08
From: Finland


I got it working by setting the following:
CODE
$db['default']['char_set'] = "latin1";
$db['default']['dbcollat'] = "latin1_swedish_ci";

At first I just tried setting the char_set but it didn't allow latin1 without dbcollat change also.


--------------------
Go to the top of the page
 
+Quote Post
If you found The Web Squeeze to be helpful, please donate so we can keep this site FREE, FRESH, and fortified with Web Design & Development info!
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No New Posts   5 Jason 185 4th March 2008 - 02:57 PM
Last post by: Daygon