Re: [Gramps-bugs] special characters in html export

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [Gramps-bugs] special characters in html export

Thomas Astleitner
oh! excuse me...!

there is utf-8 in the source.
a sample page can be viewed at http://asti.streife.com/stammbaum/index.html


Am Dienstag, 12. Juli 2005 21:34 schrieb Don Allingham:

> Thomas,
>
> What is the charset indicator at the top of the file? If the charset is
> set to something like 'UTF-8' or "ISO-8859-1", then the problem is the
> web browser, not GRAMPS. If there is no charset defined, or an incorrect
> one, then this is a GRAMPS problem.
>
> Can you send me a sample page?
>
> Don
>
> Thomas Astleitner wrote:
> > hello grampsies!
> >
> > i have surnames in my family containing special characters like Ö.
> > the html export makes a html page, containing the Ö in it's source.
> > this should NOT be, some browsers (i.e. konqueror) cannot read this
> > character, so it looks like Ã- (as you can see on http://asti.streife.com
> > between O and P). instead of Ö there should be Ö (Ä = Ä ä =
> > ä .....).
> >
> > bills IE instead can read this character...
> >
> > greets
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by the 'Do More With Dual!' webinar
> > happening July 14 at 8am PDT/11am EDT. We invite you to explore the
> > latest in dual core and dual graphics technology at this free one hour
> > event hosted by HP, AMD, and NVIDIA.  To register visit
> > http://www.hp.com/go/dualwebinar
> > _______________________________________________
> > Gramps-bugs mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/gramps-bugs


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Re: [Gramps-bugs] special characters in html export

Don Allingham
I have to agree with Alex on this. The file is correct. UTF-8 characters
 are used and the file identifies itself as using utf-8.

As it is, the page displays incorrectly because apache is overriding the
character set. In firefox, if I go to View->Character encoding, I can
see that Apache has forced the page to be iso-8859-1, even though the
file says that it is utf-8. If you change the character set encoding to
utf-8 (View-Character encoding->Unicode), you will see that the page
displays properly.

The trick is to get apache to honor the encoding and not override it.
Alex has indicated that adding the apache configuration option of:

AddDefaultCharset Off

should solve the problem. However, you may encounter a problem with
other files if they do not specify their character set.

Don


Thomas Astleitner wrote:

> oh! excuse me...!
>
> there is utf-8 in the source.
> a sample page can be viewed at http://asti.streife.com/stammbaum/index.html
>
>
> Am Dienstag, 12. Juli 2005 21:34 schrieb Don Allingham:
>
>>Thomas,
>>
>>What is the charset indicator at the top of the file? If the charset is
>>set to something like 'UTF-8' or "ISO-8859-1", then the problem is the
>>web browser, not GRAMPS. If there is no charset defined, or an incorrect
>>one, then this is a GRAMPS problem.
>>
>>Can you send me a sample page?
>>
>>Don
>>
>>Thomas Astleitner wrote:
>>
>>>hello grampsies!
>>>
>>>i have surnames in my family containing special characters like Ö.
>>>the html export makes a html page, containing the Ö in it's source.
>>>this should NOT be, some browsers (i.e. konqueror) cannot read this
>>>character, so it looks like Ã- (as you can see on http://asti.streife.com
>>>between O and P). instead of Ö there should be Ö (Ä = Ä ä =
>>>ä .....).
>>>
>>>bills IE instead can read this character...
>>>
>>>greets
>>>
>>>
>>>-------------------------------------------------------
>>>This SF.Net email is sponsored by the 'Do More With Dual!' webinar
>>>happening July 14 at 8am PDT/11am EDT. We invite you to explore the
>>>latest in dual core and dual graphics technology at this free one hour
>>>event hosted by HP, AMD, and NVIDIA.  To register visit
>>>http://www.hp.com/go/dualwebinar
>>>_______________________________________________
>>>Gramps-bugs mailing list
>>>[hidden email]
>>>https://lists.sourceforge.net/lists/listinfo/gramps-bugs
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
> July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
> core and dual graphics technology at this free one hour event hosted by HP,
> AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
> _______________________________________________
> Gramps-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-users
>



-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Re: [Gramps-bugs] special characters in html export

Alex Roitman
On 07/12/2005 03:03:51 PM, Don Allingham wrote:
>
> The trick is to get apache to honor the encoding and not override it.
> Alex has indicated that adding the apache configuration option of:
>
> AddDefaultCharset Off
>
> should solve the problem. However, you may encounter a problem with
> other files if they do not specify their character set.

See this:
   http://httpd.apache.org/docs-2.0/mod/core.html#adddefaultcharset
and the rest of that file for the details.

I usually set
  AddDefaultCharset utf-8
on my site, but I don't have any conflicting files. If the site
has a vast collection of files that do not specify charset *and*
contain non-ascii non-utf chars then they will appear incorrectly
as the server will make everything appear as utf-8.

Alex

--
Alexander Roitman   http://www.gramps-project.org


attachment0 (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Re: [Gramps-bugs] special characters in html export

Thomas Astleitner
excuse me, i'm a little confused getting with you.
why does my browser (it's a konqueror) think that a page is iso8859-1 when the
page tells my browser exactly that it is utf8 coded??
shoult i start a request at konqueror's list?
ok, thank you don and alex for your help to me!

greets


Am Dienstag, 12. Juli 2005 22:13 schrieb Alex Roitman:

> On 07/12/2005 03:03:51 PM, Don Allingham wrote:
> > The trick is to get apache to honor the encoding and not override it.
> > Alex has indicated that adding the apache configuration option of:
> >
> > AddDefaultCharset Off
> >
> > should solve the problem. However, you may encounter a problem with
> > other files if they do not specify their character set.
>
> See this:
>    http://httpd.apache.org/docs-2.0/mod/core.html#adddefaultcharset
> and the rest of that file for the details.
>
> I usually set
>   AddDefaultCharset utf-8
> on my site, but I don't have any conflicting files. If the site
> has a vast collection of files that do not specify charset *and*
> contain non-ascii non-utf chars then they will appear incorrectly
> as the server will make everything appear as utf-8.
>
> Alex


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Re: [Gramps-bugs] special characters in html export

Alex Roitman
Thomas,

On 07/12/2005 04:27:36 PM, Thomas Astleitner wrote:
> why does my browser (it's a konqueror) think that a page is iso8859-1 when the
> page tells my browser exactly that it is utf8 coded??

Because the file is served by Apache web server. The web server adds server
header along with the file. Your server says "contents is iso-8859-1"
so that the browsers (good ones anyway) then ignore the file's META tag.

In effect, your Apache overrides charset of every page it serves.
You may disable this by:

   AddDefaultCharset Off

in you /etc/apache/httpd.conf file, or you may set it to utf-8 by:

   AddDefaultCharset utf-8

in which case *every* file served by your Apache server will be presented
as a utf-8 encoded. This is probably not what you want, if you have some
iso-8859-1 files.

> shoult i start a request at konqueror's list?

No, Konqueror is doing the right thing by obeying the server header.
You need to tweak /etc/apache/httpd.conf on the server computer.

Alex

--
Alexander Roitman   http://www.gramps-project.org


attachment0 (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Re: [Gramps-bugs] special characters in html export

Don Allingham
In reply to this post by Thomas Astleitner
It is not a konqueror problem (or a browser problem). Before the the
HTML file is sent, apache sends a little context information. For
example, if I telnet to your server, this is what apache tells me:

  $ telnet asti.streife.com 80
  Trying 213.146.166.240...
  Connected to asti.streife.com.
  Escape character is '^]'.
  GET / HTTP/1.0

  HTTP/1.1 302 Found
  Date: Tue, 12 Jul 2005 21:30:52 GMT
  Server: Apache/1.3.29 (Debian GNU/Linux) PHP/4.3.3
  X-Powered-By: PHP/4.3.3
  Location: ./kunde/
  Connection: close
  Content-Type: text/html; charset=iso-8859-1

This data comes before the HTML file. You don't see it, but your browser
does. Look at the Content-Type line - it is explicitly saying that the
character set is iso-8859-1, which overrides the character set in the
HTML file.

In this case, konqueror is doing exactly what apache is telling it to
do. Unfortunately, apache is telling it to do the wrong thing.

Don



Thomas Astleitner wrote:

> excuse me, i'm a little confused getting with you.
> why does my browser (it's a konqueror) think that a page is iso8859-1 when the
> page tells my browser exactly that it is utf8 coded??
> shoult i start a request at konqueror's list?
> ok, thank you don and alex for your help to me!
>
> greets
>
>
> Am Dienstag, 12. Juli 2005 22:13 schrieb Alex Roitman:
>
>>On 07/12/2005 03:03:51 PM, Don Allingham wrote:
>>
>>>The trick is to get apache to honor the encoding and not override it.
>>>Alex has indicated that adding the apache configuration option of:
>>>
>>>AddDefaultCharset Off
>>>
>>>should solve the problem. However, you may encounter a problem with
>>>other files if they do not specify their character set.
>>
>>See this:
>>   http://httpd.apache.org/docs-2.0/mod/core.html#adddefaultcharset
>>and the rest of that file for the details.
>>
>>I usually set
>>  AddDefaultCharset utf-8
>>on my site, but I don't have any conflicting files. If the site
>>has a vast collection of files that do not specify charset *and*
>>contain non-ascii non-utf chars then they will appear incorrectly
>>as the server will make everything appear as utf-8.
>>
>>Alex
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
> July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
> core and dual graphics technology at this free one hour event hosted by HP,
> AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
> _______________________________________________
> Gramps-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gramps-users
>



-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users