Welcome Guest, Not a member yet? Register   Sign In
Encoding problem
#21

[eluser]ponto[/eluser]
Try this http://79.125.116.38/ there is more characters there. Let me know if you see something (test-server).
#22

[eluser]ponto[/eluser]
The port 80 was restricted to my IP.
#23

[eluser]osci[/eluser]
Your page looking at source code shows
Code:
<meta http-equiv="Content-type" content="text/html; charset=ISO-8859-1" />

?????
#24

[eluser]ponto[/eluser]
Yes that's the index view but in blog view it's utf8
#25

[eluser]osci[/eluser]
You are mixing charsets in your views?
Switch all your files to utf8 as suggested!!!

Edit: and if you still have problems save your files in utf8 not ansi or whatever else.
#26

[eluser]ponto[/eluser]
I have changed the index to utf-8 and changed AddDefaultCharset to ISO-8859-1. In FF it works now but when I try to send a new set of data it doesn't work as you can se in the blog víew.
#27

[eluser]osci[/eluser]
why are you doing AddDefaultCharset to iso-8859-1?????

and what is your blog view isn't it the page I'm seeing?

Edit:
A little search on amazonws

If your problems is with adding records through forms maybe this is the reason: problems with utf8 - Is Transfer-Encoding: chunked supported by Amazon S3?

If that's the case define in your form the charset to be utf8
#28

[eluser]ponto[/eluser]
There is endless possibilities here.
In my browsers (chrome, IE9 and FF) I cant't read ÅÖÄ when AddDefaultCharset is set to utf-8.
And if CI config.php is set to utf-8 mysql doesn't get the characters ÅÖÄ.

I'll understand if you guys get bored with this because you can use utf-8 all the times.
#29

[eluser]snifty[/eluser]
The content is coming up okay for me in both Firefox and Chrome (Mac), but FF thinks that the page is Unicode, whereas Chrome thinks it's Latin-1.

The bytes in the page actually *are* encoded in Latin-1, as this Python session will demonstrate:

Code:
>>> import urllib
>>> html = urllib.urlopen('http://79.125.116.38/').read()
>>> h4 =  [line for line in html.splitlines() if 'h4' in line][0]
>>> print h4
            <h4>Guldet p? v?g mot toppen</h4>
>>> print h4.decode('latin-1')
            <h4>Guldet på väg mot toppen</h4>

My terminal is set to UTF-8, so as you can see when I try to print it, the UTF-8 encoding can't recognize the non-ASCII bits. But if I decode it from Latin-1 (into the default, UTF-8), and then print the result, it shows up ok.

The point of all this is that despite what the headers in your file and anything else says, what you're getting out of your db is still Latin-1 (ISO-8859-1).

I can understand why you would want to try to make your whole app be Latin-1 if you have a ton of content in your database, but if it's a small amount of content you might consider trying to convert the whole thing to UTF-8, it's going to make your life easier in the future...

Is the fact that you have a ton of content encoded as Latin-1 what's keeping you from using UTF-8? Unicode is really the path of least resistance these days...
#30

[eluser]ponto[/eluser]
This is an Linux-instance with mysql. S3 is the Simple storage where the I can have a static website.




Theme © iAndrew 2016 - Forum software by © MyBB