Welcome Guest, Not a member yet? Register   Sign In
Problem inserting german special Chracters
#1

[eluser]breastfed[/eluser]
Hello

i am trying to add german Chars like ÄÖÜ or ß in the Database by a webbased Form.

I think the Collations are set right, you can see them in the Screenshots of php Myadmin and the database.php.

The Table i am working on is "jobs".

What am i doing wrong?

Thank you guys!
#2

[eluser]davidbehler[/eluser]
What exactly is the problem?
They aren't displayed correctly

Try adding this to your website:
Code:
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />

Offtopic: Hallo von Deutschland nach Deutschland Smile
#3

[eluser]breastfed[/eluser]
Hello Waldmeister,

i already have this charset in my HTML Template.

Already the Database with PHPmyAdmin is showing "M?nster" instead of "Münster".

Du Deutscher du... Wink
#4

[eluser]davidbehler[/eluser]
What happens if you enter those characters in your phpmyadmin directly? Does that work?

And try adding this to your form tag
Code:
accept-charset="utf8"
#5

[eluser]breastfed[/eluser]
I am using:
<?php echo form_open($this->uri->uri_string())?>

for the Form.

Adding an "ü" inside of PHPmyAdmin works fine.
#6

[eluser]davidbehler[/eluser]
try
Code:
<?php echo form_open($this->uri->uri_string(), array("accept-charset" => "utf8"))?>
#7

[eluser]breastfed[/eluser]
Now i have ä,ü and ö in the Database, but they are not displayed correctly on the Website.
But i added "utf-8" as the Charset.

What might be wrong?

THanks!
#8

[eluser]davidbehler[/eluser]
Do you have an online example of your problem?
#9

[eluser]Phil Sturgeon[/eluser]
You need to set UTF-8 on the connection, the table and varchar/text fields.

Also, I always use utf8_unicode_ci and it never gives me any problems.
#10

[eluser]davidbehler[/eluser]
The problem lies with his apache server. Its default char set seems to be set to "ISO-8859-1" instead of utf-8 and therefore overwrites the content-type. He might be able to fix this by editing the apache config or adding this right before loading the view:
Code:
header('Content-type: text/html; charset=utf-8');




Theme © iAndrew 2016 - Forum software by © MyBB