On 3 August 2012 22:09, Nadir Sim <[email protected]> wrote:
> Hello,
>
> I'm trying to set the encoding to ISO-8859-15 in a user config file 
> (Wiki._conf). The encoding parameter in the system wide config file 
> (asciidoc.conf) is set to UTF-8. It seems that the system config is read 
> multiple times and overwrites my user configuration:
>
> ~/opt/asciidoc-8.6.8$ ./asciidoc.py -v -f /home/guenther/Wiki/Wiki._conf 
> /tmp/adebug_in.txt
> asciidoc: reading: /home/guenther/opt/asciidoc-8.6.8/asciidoc.conf
> asciidoc: reading: /home/guenther/Wiki/Wiki._conf
> asciidoc: reading: /home/guenther/opt/asciidoc-8.6.8/asciidoc.conf
> asciidoc: reading: /tmp/adebug_in.txt
> asciidoc: FAILED: 'UTF-8' codec can't decode "Eine �berschrift zweiter Groe�e"
> ...
>
> With the encoding parameter on the command line everything works well:
>
> ~/opt/asciidoc-8.6.8$ ./asciidoc.py -v --attribute encoding=ISO-8859-15 -f 
> /home/guenther/Wiki/Wiki._conf /tmp/adebug_in.txt
> asciidoc: reading: /home/guenther/opt/asciidoc-8.6.8/asciidoc.conf
> asciidoc: reading: /home/guenther/Wiki/Wiki._conf
> asciidoc: reading: /home/guenther/opt/asciidoc-8.6.8/asciidoc.conf
> ...
> asciidoc: reading: /tmp/adebug_in.txt
>
> Strange: I get the FAILED message only if there is an Umlaut on the first 
> line of the input file. Adding a dummy ("test") as the first line of the 
> input file /tmp/adebug_in.txt makes asciidoc working again:
>
> ~/opt/asciidoc-8.6.8$ ./asciidoc.py -v -f /home/guenther/Wiki/Wiki._conf 
> /tmp/adebug_in.txt
> asciidoc: reading: /home/guenther/opt/asciidoc-8.6.8/asciidoc.conf
> asciidoc: reading: /home/guenther/Wiki/Wiki._conf
> asciidoc: reading: /home/guenther/opt/asciidoc-8.6.8/asciidoc.conf
> asciidoc: reading: /tmp/adebug_in.txt
>
> What's going wrong here?

Hi,

>From User Guide section 8.2

"If the header contains non-UTF-8 characters then the encoding must
precede the header (either in the document or on the command-line)."

Since it has to know what encoding to read the header to look for
attributes, including :encoding:

This happens before any conf files are read.

Cheers
Lex



>
> --
> You received this message because you are subscribed to the Google Groups 
> "asciidoc" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/asciidoc/-/PPXfSmfsY9wJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/asciidoc?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

Reply via email to