* Add publishing with utf8
@ 2011-11-21 22:06 sindikat
2011-11-22 1:59 ` Nick Dokos
0 siblings, 1 reply; 7+ messages in thread
From: sindikat @ 2011-11-21 22:06 UTC (permalink / raw)
To: emacs-orgmode
I use standard org-mode methods to publish my projects to html. However by
default they are published with tag <meta http-equiv="Content-Type"
content="text/html;charset=iso-8859-1"/>, however i need charset to be
changed to "utf8", as i am using Russian in my blog too. Please make it
possible somehow. Best wishes.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Add publishing with utf8
2011-11-21 22:06 sindikat
@ 2011-11-22 1:59 ` Nick Dokos
2011-11-22 8:03 ` Jambunathan K
0 siblings, 1 reply; 7+ messages in thread
From: Nick Dokos @ 2011-11-22 1:59 UTC (permalink / raw)
To: sindikat; +Cc: nicholas.dokos, emacs-orgmode
sindikat <sindikat@mail36.net> wrote:
> I use standard org-mode methods to publish my projects to
> html. However by default they are published with tag <meta
> http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>,
> however i need charset to be changed to "utf8", as i am using Russian
> in my blog too. Please make it possible somehow. Best wishes.
>
My html files are exported with charset=utf-8. I believe that that's
because my org-mode buffers are utf-8 and ultimately because I've
set LANG=en_US.UTF-8.
Try the following when visiting your org file (actually, a backup of your org file :-))
o C-x RET f utf-8 RET
o Save the file.
o Then export it to HTML.
HTH,
Nick
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Add publishing with utf8
2011-11-22 1:59 ` Nick Dokos
@ 2011-11-22 8:03 ` Jambunathan K
0 siblings, 0 replies; 7+ messages in thread
From: Jambunathan K @ 2011-11-22 8:03 UTC (permalink / raw)
To: nicholas.dokos; +Cc: sindikat, emacs-orgmode
> My html files are exported with charset=utf-8. I believe that that's
> because my org-mode buffers are utf-8 and ultimately because I've
> set LANG=en_US.UTF-8.
>
> Try the following when visiting your org file (actually, a backup of
> your org file :-))
>
> o C-x RET f utf-8 RET
>
> o Save the file.
>
> o Then export it to HTML.
C-h v org-export-html-coding-system
How about customizing the above variable?
> HTH,
> Nick
>
>
>
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Add publishing with utf8
@ 2011-11-22 20:09 sindikat
2011-11-22 21:08 ` Nick Dokos
2011-11-22 21:17 ` Olaf Dietsche
0 siblings, 2 replies; 7+ messages in thread
From: sindikat @ 2011-11-22 20:09 UTC (permalink / raw)
To: emacs-orgmode
I added this to my .emacs:
(set-language-environment "UTF-8")
(prefer-coding-system 'utf-8-unix)
(org-export-html-coding-system 'utf-8-unix)
but Emacs still opens files with pure ASCII as undecided-unix, thus
producing wrong iso-8859-1 in my charsets again. I don't know what to do.
Is there any way to force Emacs open any file as utf-8?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Add publishing with utf8
2011-11-22 20:09 Add publishing with utf8 sindikat
@ 2011-11-22 21:08 ` Nick Dokos
2011-11-22 21:17 ` Olaf Dietsche
1 sibling, 0 replies; 7+ messages in thread
From: Nick Dokos @ 2011-11-22 21:08 UTC (permalink / raw)
To: sindikat; +Cc: nicholas.dokos, emacs-orgmode
sindikat <sindikat@mail36.net> wrote:
> I added this to my .emacs:
>
> (set-language-environment "UTF-8")
> (prefer-coding-system 'utf-8-unix)
> (org-export-html-coding-system 'utf-8-unix)
>
This last one is wrong:
(setq org-export-html-coding-system 'utf-8-unix)
might work better. This might be all you have to do, if Jambunathan K is
correct.
Nick
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Add publishing with utf8
2011-11-22 20:09 Add publishing with utf8 sindikat
2011-11-22 21:08 ` Nick Dokos
@ 2011-11-22 21:17 ` Olaf Dietsche
1 sibling, 0 replies; 7+ messages in thread
From: Olaf Dietsche @ 2011-11-22 21:17 UTC (permalink / raw)
To: sindikat; +Cc: emacs-orgmode
"sindikat" <sindikat@mail36.net> writes:
> I added this to my .emacs:
>
> (set-language-environment "UTF-8")
> (prefer-coding-system 'utf-8-unix)
This is what I use. Even when I open a new file, the buffer coding
system is chosen as utf-8-unix, shown as U: in the mode line.
Maybe your environment is setup differently? What is the value of LANG
or LC_ALL or any other LC_* environment variable?
I have set LANG=de_DE.utf8.
> (org-export-html-coding-system 'utf-8-unix)
>
> but Emacs still opens files with pure ASCII as undecided-unix, thus
> producing wrong iso-8859-1 in my charsets again. I don't know what to do.
> Is there any way to force Emacs open any file as utf-8?
Maybe C-h v file-coding-system-alist RET helps, if setting the
environment doesn't solve your problem.
Regards, Olaf
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Add publishing with utf8
@ 2011-11-23 14:49 sindikat
0 siblings, 0 replies; 7+ messages in thread
From: sindikat @ 2011-11-23 14:49 UTC (permalink / raw)
To: emacs-orgmode
Now i have
(set-language-environment "UTF-8")
(prefer-coding-system 'utf-8-unix)
(setq org-export-html-coding-system 'utf-8-unix)
and publishing works perfectly. Funny, that i have every locale set to
"en_US.UTF-8", but LANGUAGE and LC_ALL set to empty. But when i set them to
"en_US.UTF-8", Emacs still opens non-utf8 files as "undecided-unix". In
file-coding-system-alist i found expression ("" undecided) and when i
changed it to utf-8-unix, every file started opening with this encoding.
I've solved my problem, thanks to you all.
I only not sure why opening everything as utf8 wasn't made default in Emacs.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-11-23 14:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-22 20:09 Add publishing with utf8 sindikat
2011-11-22 21:08 ` Nick Dokos
2011-11-22 21:17 ` Olaf Dietsche
-- strict thread matches above, loose matches on Subject: below --
2011-11-23 14:49 sindikat
2011-11-21 22:06 sindikat
2011-11-22 1:59 ` Nick Dokos
2011-11-22 8:03 ` Jambunathan K
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).