How set UTF8 on the sage Notebook published page automatically?

23 views
Skip to first unread message

NoSyu

unread,
Feb 6, 2009, 9:27:35 AM2/6/09
to sage-support
Hello~

I test the sage on the sage Notebook homepage.

http://www.sagenb.org

So I wrote the code and comments and published it.

http://www.sagenb.org/home/pub/209/


I'm Korean and I want to show my code to my friends.

So I wrote the comments in Korean.

Sage support UTF-8, So I can see the comments.


But there is one problem.

Web browser's default encoding is EUC-KR not UTF-8.

In EUC-KR encoding, I can't read the comments cause it's broken.

So everytime my friends change the encoding manually.

Does any other solution about this problems?

Dan Drake

unread,
Feb 8, 2009, 9:05:07 PM2/8/09
to sage-s...@googlegroups.com
Hello,

I suspect that this is a browser problem, and not something that can be
fixed in the Sage notebook. I'm using Firefox, and it seems to
automatically switch encodings for me; when I visit
http://www.kaist.ac.kr/, it's in euc-kr and I can read everything. When
I visit http://www.google.co.kr/, it's UTF-8 and Firefox automatically
detects this and switches.

Since you are Korean, I am guessing that you are using Internet
Explorer. Try using Firefox and see if that helps:
http://www.mozilla.or.kr/ko/

Dan

--
--- Dan Drake <dr...@kaist.edu>
----- KAIST Department of Mathematical Sciences
------- http://mathsci.kaist.ac.kr/~drake

signature.asc

NoSyu

unread,
Feb 8, 2009, 9:47:30 PM2/8/09
to sage-support
Thanks to reply my post.

Actually, in firefox it works well.

But as you know, Windows IE is popular Web browser. Therefore I can't
say 'You should use firefox to see this comments' to all users.

I think there is no the meta html code to say about page.


http://www.sagenb.org/home/pub/220/

I wrote comments in Korean at that page.

But I can't read this comment on the IE7, because IE7 don't know about
encoding. So it set EUC-KR, because this machine OS is Windows XP
Korea.


I suggests that the meta html code is added to all notebook page like
this

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

Then Web browser know this page's encoding is UTF-8.



---------------------------------
누구나가 다,
자기 옆에서 눈물을 흘리며 신음하는
불행한 사람들에 비해
자기가 훨씬 더 불행하다고 생각하지요.
이게 바로 우리 가련한 인간들의 오만 중의 하나입니다.
- LE COMTE DE MONTECRISTO

Nickname : NoSyu
School of Information & Communication Engineering, SungKyunKwan
University
blog : http://nosyu.pe.kr

On 2월9일, 오전11시05분, Dan Drake <dr...@kaist.edu> wrote:
> Hello,
>
>
>
> On Fri, 06 Feb 2009 at 06:27AM -0800, NoSyu wrote:
> > Hello~
>
> > I test the sage on the sage Notebook homepage.
>
> >http://www.sagenb.org
>
> > So I wrote the code and comments and published it.
>
> >http://www.sagenb.org/home/pub/209/
>
> > I'm Korean and I want to show my code to my friends. So I wrote the
> > comments in Korean. Sage support UTF-8, So I can see the comments.
>
> > But there is one problem. Web browser's default encoding is EUC-KR not
> > UTF-8. In EUC-KR encoding, I can't read the comments cause it's
> > broken. So everytime my friends change the encoding manually. Does any
> > other solution about this problems?
>
> I suspect that this is a browser problem, and not something that can be
> fixed in the Sage notebook. I'm using Firefox, and it seems to
> automatically switch encodings for me; when I visithttp://www.kaist.ac.kr/, it's in euc-kr and I can read everything. When
> I visithttp://www.google.co.kr/, it's UTF-8 and Firefox automatically
> detects this and switches.
>
> Since you are Korean, I am guessing that you are using Internet
> Explorer. Try using Firefox and see if that helps:http://www.mozilla.or.kr/ko/
>
> Dan
>
> --
> --- Dan Drake <dr...@kaist.edu>
> ----- KAIST Department of Mathematical Sciences
> ------- http://mathsci.kaist.ac.kr/~drake
>
> signature.asc
> < 1K보기다운로드

Dan Drake

unread,
Feb 8, 2009, 11:01:18 PM2/8/09
to sage-s...@googlegroups.com
On Sun, 08 Feb 2009 at 06:47PM -0800, NoSyu wrote:
> Thanks to reply my post.
>
> Actually, in firefox it works well.
>
> But as you know, Windows IE is popular Web browser. Therefore I can't
> say 'You should use firefox to see this comments' to all users.

I am painfully aware of how popular IE is!

> I suggests that the meta html code is added to all notebook page like
> this
>
> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

This is a great idea, and I'm surprised that the notebook server doesn't
do this already. This sort of issue is already known:

http://trac.sagemath.org/sage_trac/ticket/1477

...but maybe I could get a quick patch in that would fix this. I've made
a new ticket for your suggestion:

http://trac.sagemath.org/sage_trac/ticket/5211

signature.asc

NoSyu

unread,
Feb 8, 2009, 11:11:23 PM2/8/09
to sage-support
Thanks to fix this problem.

Have a nice day~^^
> signature.asc
> < 1K보기다운로드

mabshoff

unread,
Feb 9, 2009, 2:23:29 AM2/9/09
to sage-support


On Feb 8, 8:01 pm, Dan Drake <dr...@kaist.edu> wrote:
> On Sun, 08 Feb 2009 at 06:47PM -0800, NoSyu wrote:
> > Thanks to reply my post.
>
> > Actually, in firefox it works well.
>
> > But as you know, Windows IE is popular Web browser. Therefore I can't
> > say 'You should use firefox to see this comments' to all users.
>
> I am painfully aware of how popular IE is!

Well, I tested the worksheet and with Safari on OSX I also had to
manually select UTF-8 to see the comments correctly, so it isn't only
IE :)

Cheers,

Michael
Reply all
Reply to author
Forward
0 new messages