How to create Sphinx documentation with accents (french, portuguese...)

1,531 views
Skip to first unread message

Lulu

unread,
Feb 23, 2011, 3:25:05 PM2/23/11
to sphinx-dev
Hello,
I'm very new with sphinx and more than a complete newby with Python
(it's a serpent isn't it ? No ?! It's a programming language ! Oh,
gosh !)
I have a very simple problem : I try to use Sphinx for my docs and I
can't put any accents (I'm writing in french). I have the following
message : "undecodable source character, replacing with "?" "

Some data : I'm working under Windows 7 starter, I'm using Python 2.7
and I make my html files (the ones with the "?" everywhere) using
"make html" in the Windows command windows.

I didn't find any help on the web neither any solution by myself (I
tried to "uncomment" the source_enconding of config.py but it was a
useless try). so I try here.

By the way, except this "little" problem, Sphinx and Python look like
tremendous tools !

By advance, thanks to anyone that could help me,

Lulu

daspostloch

unread,
Feb 25, 2011, 4:18:03 AM2/25/11
to sphin...@googlegroups.com
Do these links help?

http://sphinx.pocoo.org/rest.html#source-encoding

http://sphinx.pocoo.org/tutorial.html#basic-configuration

For me, I have no problems with the raw line

Expos� ��

in my .rst file.

Maybe check if your editor encoding matches what
Sphinx assumes (UTF8)?

Good luck -Paul

Françoise Pinsard

unread,
Feb 25, 2011, 4:54:39 AM2/25/11
to sphin...@googlegroups.com

On Fri, February 25, 2011 10:18 am, daspostloch wrote:
> Do these links help?
>
> http://sphinx.pocoo.org/rest.html#source-encoding
>
> http://sphinx.pocoo.org/tutorial.html#basic-configuration
>
> For me, I have no problems with the raw line
>
> Expos� ��
>
> in my .rst file.
>
> Maybe check if your editor encoding matches what
> Sphinx assumes (UTF8)?
>

or change source_encoding in your conf.py like this
source_encoding = 'iso-8859-15'


> On 02/23/2011 09:25 PM, Lulu wrote:
>> Hello,
>> I'm very new with sphinx and more than a complete newby with Python
>> (it's a serpent isn't it ? No ?! It's a programming language ! Oh,
>> gosh !)
>> I have a very simple problem : I try to use Sphinx for my docs and I
>> can't put any accents (I'm writing in french). I have the following
>> message : "undecodable source character, replacing with "?" "
>>
>> Some data : I'm working under Windows 7 starter, I'm using Python 2.7
>> and I make my html files (the ones with the "?" everywhere) using
>> "make html" in the Windows command windows.
>>
>> I didn't find any help on the web neither any solution by myself (I
>> tried to "uncomment" the source_enconding of config.py but it was a
>> useless try). so I try here.
>>
>> By the way, except this "little" problem, Sphinx and Python look like
>> tremendous tools !
>>
>> By advance, thanks to anyone that could help me,
>>
>> Lulu


--
Fran�oise Pinsard
LOCEAN - IPSL
UMR 7159 CNRS/IRD/UPMC/MNHN
Universit� Pierre et Marie Curie aile 45-55 5 �tage pi�ce 516
Case 100 - 4 Place Jussieu 75252 Paris cedex 05
T�l. +33 1 44 27 47 65 Fax +33 1 44 27 71 59
mailto:Francois...@locean-ipsl.upmc.fr
http://www.locean-ipsl.upmc.fr/

Chris Boorman

unread,
Sep 6, 2012, 11:53:14 PM9/6/12
to sphin...@googlegroups.com
I solved this problem by opening each of my rsST source files (*.rst) in my text editor (EditPad Pro 7), and then changing each filie's encoding from:
 
Windows 1252: Western European
 
to
 
Unicode, UTF-8
 
and then saving each file.

Rômulo Rocha

unread,
Jan 8, 2018, 5:20:26 PM1/8/18
to sphinx-users
Can you help me?
Reply all
Reply to author
Forward
0 new messages