problem with french accents

0 views
Skip to first unread message

ToF

unread,
Oct 14, 2009, 8:35:36 AM10/14/09
to BoltWire
Hello,

I have download and installed the 3.2.6 version of the BoltWire wiki
but I cannot make the accent appear correctly.
When I preview the page, the accent are correctly displayed : the
string "L'équipe" is correctly displayed.
But when I click on "save", the string appears as "L'équipe".

What can I do to fix this ?
Thanks for your help,
Christophe

The Editor

unread,
Oct 14, 2009, 9:26:28 AM10/14/09
to bolt...@googlegroups.com
If you look in the boltwire/barn/scripts folder there is a file called
engine.php. Open this up in your text editor and scroll down to line
1827. You should see two lines like this commented out:

// BOLTreplace(''', '\'');
// BOLTreplace('"', '"');

Try uncommenting them (just delete the // at the beginning). I tried
eliminating these lines in this release as it seemed our encoding
system was working better--and it didn't seem we needed these lines in
my tests. But your examples shows they serve a purpose after all...
:)

The other thing to check is your skin. It needs to have the following
lines at the top of the html:

<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN'
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

Actually I think this is more likely your problem, given the symptoms
you describe. But your string "L'équipe" triggered the other bug in my
tests, so might as well fix it now. I'll restore this for the next
release... Otherwise the accents seem fine in my default skin.

Cheers,
Dan


On Wed, Oct 14, 2009 at 8:35 AM, ToF <christop...@gmail.com> wrote:
>
> Hello,
>
> I have download and installed the 3.2.6 version of the BoltWire wiki
> but I cannot make the accent appear correctly.
> When I preview the page, the accent are correctly displayed : the
> string "L'équipe" is correctly displayed.
> But when I click on "save", the string appears as "L'équipe".

ToF

unread,
Oct 14, 2009, 11:17:54 AM10/14/09
to BoltWire
Thanks a lot for your prompt answer ! My comments on your
recommendations are in the text below

On 14 oct, 15:26, The Editor <edi...@fast.st> wrote:
> If you look in the boltwire/barn/scripts folder there is a file called
> engine.php. Open this up in your text editor and scroll down to line
> 1827. You should see two lines like this commented out:
>
> //      BOLTreplace('&#39;', '\'');
> //      BOLTreplace('&#34;', '"');
>
> Try uncommenting them (just delete the // at the beginning). I tried
> eliminating these lines in this release as it seemed our encoding
> system was working better--and it didn't seem we needed these lines in
> my tests. But your examples shows they serve a purpose after all...
> :)

--> It does not make any effect on the display of the accents
characters ! :-(

>
> The other thing to check is your skin. It needs to have the following
> lines at the top of the html:
>
> <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN'
> 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
>
> Actually I think this is more likely your problem, given the symptoms
> you describe. But your string "L'équipe" triggered the other bug in my
> tests, so might as well fix it now. I'll restore this for the next
> release... Otherwise the accents seem fine in my default skin.

--> Actually, I am using the default skin ... I find the default skin
very nice because very simple... Where can I check the header of the
HTML file for the default skin ?

>
> Cheers,
> Dan
>

Thanks a lot,
Christophe

The Editor

unread,
Oct 14, 2009, 11:52:33 AM10/14/09
to bolt...@googlegroups.com
On Wed, Oct 14, 2009 at 11:17 AM, ToF <christop...@gmail.com> wrote:
>
>> Try uncommenting them (just delete the // at the beginning). I tried
>> eliminating these lines in this release as it seemed our encoding
>> system was working better--and it didn't seem we needed these lines in
>> my tests. But your examples shows they serve a purpose after all...
>> :)
>
> --> It does not make any effect on the display of the accents
> characters ! :-(

I didn't think this would affect anything. But it should correct
problems with ' & ". Make sure you re-edit the page and save it again
just to make sure it has no effect.

>> The other thing to check is your skin. It needs to have the following
>> lines at the top of the html:
>

> --> Actually, I am using the default skin ... I find the default skin
> very nice because very simple... Where can I check the header of the
> HTML file for the default skin ?

Ok. The default skin has the correct headers. That's what I used on my
test page. There are two ways to check this:

1) Browse the page, right click, and hit view source. It should be
visible in the html.

2) The actual source is in a page called code.skin. You can double
check it there. But unless you have edited something it should be
fine.

Do you have a url where this is happening I can look at?

Cheers,
Dan

ToF

unread,
Oct 14, 2009, 12:59:52 PM10/14/09
to BoltWire
Thanks again for you rapid answer ! It is really a pleasure to see
that we have some support !!

On 14 oct, 17:52, The Editor <edi...@fast.st> wrote:
> On Wed, Oct 14, 2009 at 11:17 AM, ToF <christophe.luc...@gmail.com> wrote:
>
> >> Try uncommenting them (just delete the // at the beginning). I tried
> >> eliminating these lines in this release as it seemed our encoding
> >> system was working better--and it didn't seem we needed these lines in
> >> my tests. But your examples shows they serve a purpose after all...
> >> :)
>
> > --> It does not make any effect on the display of the accents
> > characters ! :-(
>
> I didn't think this would affect anything. But it should correct
> problems with ' & ". Make sure you re-edit the page and save it again
> just to make sure it has no effect.
>
> >> The other thing to check is your skin. It needs to have the following
> >> lines at the top of the html:
>
> > --> Actually, I am using the default skin ... I find the default skin
> > very nice because very simple... Where can I check the header of the
> > HTML file for the default skin ?
>
> Ok. The default skin has the correct headers. That's what I used on my
> test page. There are two ways to check this:
>
> 1) Browse the page, right click, and hit view source. It should be
> visible in the html.

==> I have the following code when I view source:

<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>Unipoly: Main</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /
>
<meta name="description" content="Wiki de l&#39;association Unipoly" /
>
<meta name="keywords" content="Keywords goes here..." />
<meta name="author" content="Your name goes here" />
<link rel='shortcut icon' href='../boltwire/farm/img/favicon.ico' />
<style type='text/css'><!--
...




> 2) The actual source is in a page called code.skin. You can double
> check it there. But unless you have edited something it should be
> fine.

==> I have this:


<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>$$sitename: $$title</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="$$description" />
<meta name="keywords" content="$$keywords" />
<meta name="author" content="$$webmaster" />
<link rel='shortcut icon' href='$$img/favicon.ico' />
<<style>>
</head>


> Do you have a url where this is happening I can look at?

==> it happens here: http://unipoly.epfl.ch/wiki/unipoly/

What do you think ?

>
> Cheers,
> Dan

ToF

unread,
Oct 14, 2009, 1:07:50 PM10/14/09
to BoltWire
On the link that I gave you, it is written (as displayed on my
screen):

"Ce wiki a été mis en place pour les membres d'Unipoly afin de mieux
gerer l'association et les informations qui y circulent."

And in the file which is stored on the server, I have the following :

----------------------------------------------------------------
! Bienvenue sur le Wiki d'Unipoly

Ce wiki a été mis en place pour les membres d'Unipoly afin de mieux
gerer l'association et les informations qui y circulent.

Le comite d'Unipoly
~data~
author: admin
~
changesummary: Page edited by admin.
~
----------------------------------------------------------------

It means that it is correctly saved in the file and it is not
displayed correctly.
The thing that is strange is that when the page is previewed, we got
the accents, it is well displayed. It goes wrong when we click on
save...

Strange. Any idea ?

The Editor

unread,
Oct 14, 2009, 2:10:42 PM10/14/09
to bolt...@googlegroups.com
I don't see anything wrong with your page. No idea what is happening.
Anyone else have any ideas? Anyone else having problems?

I definitely have it working on my site. I can save and preview and
edit whatever with no apparent problems...

Cheers,
Dan

Kevin

unread,
Oct 14, 2009, 2:29:35 PM10/14/09
to bolt...@googlegroups.com
I created a test page with his content.

http://wiki.tnet.com/test

Works fine there on 3.2.6

Kevin

unread,
Oct 14, 2009, 3:03:14 PM10/14/09
to bolt...@googlegroups.com
Not sure if this means anything but your server is set to use ISO-8859-1...

Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=ISO-8859-1

Your server might have this set as the default...

The directive is in the server config files like:

AddDefaultCharset ISO-8859-1

While mine is not set at all which appears to be the norm.

Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Connection: close
Vary: Accept-Encoding
Content-Encoding: gzip
Transfer-Encoding: chunked
Content-Type: text/html

Boltwire likewise...

Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Connection: close
Content-Length: 11854
Content-Type: text/html

Not sure if this has a bearing on the issue but if you don't include charset settings in your headers of your web pages, the server is saying they will be ISO-8859-1 format.

The Editor

unread,
Oct 14, 2009, 8:30:52 PM10/14/09
to bolt...@googlegroups.com
I'm quite sure this is the problem--though I don't know how to reset
the server settings. My text editor does not understand utf-8, and I
see the same thing in my source that you are seeing in your page. So
the browser is clearly thinking you are using ISO 8859. Try talking
with your web hosting people to see if there is anything they can do.

Cheers,
Dan

ToF

unread,
Oct 15, 2009, 3:21:56 AM10/15/09
to BoltWire
I works also fine for me !!!

On 14 oct, 20:29, Kevin <tnet.servi...@gmail.com> wrote:
> I created a test page with his content.
>
> http://wiki.tnet.com/test
>
> Works fine there on 3.2.6
>
>
>
> On Wed, Oct 14, 2009 at 11:10 AM, The Editor <edi...@fast.st> wrote:
>
> > I don't see anything wrong with your page. No idea what is happening.
> > Anyone else have any ideas?  Anyone else having problems?
>
> > I definitely have it working on my site. I can save and preview and
> > edit whatever with no apparent problems...
>
> > Cheers,
> > Dan
>

ToF

unread,
Oct 15, 2009, 3:29:06 AM10/15/09
to BoltWire
I really would like to thank you for your help !!
I will try to figure out this with my web hosting people... The
problem is that they are not very collaborative... Do you think there
is a way to hack boltwire wiki so that it can deal correctly with the
setting of the server ?

The Editor

unread,
Oct 15, 2009, 5:37:46 AM10/15/09
to bolt...@googlegroups.com
It may be possible, but I don't know how. If anyone has any
suggestions we can try it. Possibly some setting in a .htaccess file?
It may also depend on the browser which settings it uses: server or
web page. But this is kind of strange. You might consider another
server if they can't help you. Have you tried googling the issue?

Cheers
Dan

ToF

unread,
Oct 15, 2009, 6:14:59 AM10/15/09
to BoltWire
Yes, I am googling all the time !!! And this group was the last chance
because I did not find anything from my searches...

ToF

unread,
Oct 15, 2009, 6:18:42 AM10/15/09
to BoltWire
I have another question ...

I want to have a more "secure access to the registration". I try to
run this:

[session if "equal {=code} toto ? authkey register"]
[session if "equal {=code} toto ? register password,member"]

"code" is from a form that I declared like this: [text code]

It does not seem to work... What's wrong ? I did the modification in
the action.register page.

DrunkenMonk

unread,
Oct 15, 2009, 6:38:31 AM10/15/09
to BoltWire
If the problem is that another charset is being used, add this to your
header:

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

in the skin, and that should do it. Otherwise setting your own default
charset in your .htaccess should override the server base value.
Or am I missing something?

On Oct 15, 11:37 am, The Editor <edi...@fast.st> wrote:
> It may be possible, but I don't know how. If anyone has any
> suggestions we can try it.  Possibly some setting in a .htaccess file?
>  It may also depend on the browser which settings it uses: server or
> web page. But this is kind of strange. You might consider another
> server if they can't help you.  Have you tried googling the issue?
>
> Cheers
> Dan
>

The Editor

unread,
Oct 15, 2009, 7:00:29 AM10/15/09
to bolt...@googlegroups.com
On Thu, Oct 15, 2009 at 6:18 AM, ToF <christop...@gmail.com> wrote:
>
> I have another question ...
>
> I want to have a more "secure access to the registration". I try to
> run this:
>
> [session if "equal {=code} toto ? authkey register"]
> [session if "equal {=code} toto ? register password,member"]

You need = in the field=value assignements

[session if "equal {=code} toto ? authkey=register"]
[session if "equal {=code} toto ? register=password,member"]

Or even

> [session if "equal {=code} toto ? authkey=register , register=password,member"]

Try that... Interesting idea!

Cheers,
Dan

The Editor

unread,
Oct 15, 2009, 7:04:46 AM10/15/09
to bolt...@googlegroups.com
Don't give up. Have you talked with the people hosting your website?
What did they say?

Also check all the .htaccess files on your server. It is possible this
is being done in some default .htaccess file and you can change or
delete it. I'm not an expert on server configuration--but I seem to
have seen this somewhere.

My solution when I get stuck is to go into some tech chat rooms on one
of the main servers and pester people till I get an answer. If I find
more time, I'll look into this myself. But it is definitely your
charset encoding setting. I'm pretty sure.

Cheers,
Dan

P.S. DrunkenMonk--He has that setting in his skin. Do you have the
syntax for overriding this in the .htaccess. He says he hasn't been
able to find it on google.

Kevin

unread,
Oct 15, 2009, 8:05:43 AM10/15/09
to bolt...@googlegroups.com
The override in the top of the HTML header should really be fixing this for him.

Good article on Unicode...

http://www.joelonsoftware.com/articles/Unicode.html

You are supposed to be able to override the server default with an entry in .htaccess like:

AddDefaultCharset UTF-8

Some other ways:

http://www.askapache.com/htaccess/setting-charset-in-htaccess.html

Kevin

unread,
Oct 15, 2009, 8:14:58 AM10/15/09
to bolt...@googlegroups.com
Adding the line at the top of .htaccess:

AddDefaultCharset UTF-8

Changed the output of my web server on pages that have that in the .htaccess on the root page to:


Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Connection: close
Vary: Accept-Encoding
Content-Encoding: gzip
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8

Without it, I get:


Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Connection: close
Vary: Accept-Encoding
Content-Encoding: gzip
Transfer-Encoding: chunked
Content-Type: text/html



Kevin

unread,
Oct 15, 2009, 8:21:35 AM10/15/09
to bolt...@googlegroups.com
My .htaccess file:

# .htaccess for wiki site

AddDefaultCharset UTF-8

RewriteEngine On
Options FollowSymlinks
RewriteBase /
RewriteCond %{THE_REQUEST} !/robots.txt
RewriteCond %{THE_REQUEST} !/imgs/(.*)\.
RewriteCond %{THE_REQUEST} !/home/files/(.*)\.
RewriteCond %{THE_REQUEST} !/boltwire/farm/img/(.*)\.
RewriteRule ^(.*)$ home/index.php?p=$1 [QSA,L]

ErrorDocument 401 /home/index.php?p=main
ErrorDocument 403 /home/index.php?p=main
ErrorDocument 404 /home/index.php?p=main.404

# end

I am using CleanURL's.  I have a robots.txt in the root of the website so I am excluding it along with a directory called imgs from rewriting.

I am experimenting with ErrorDocument redirects as well.  This is for sites that were in a different format before converting to the wiki so that they don't get plain 404 Errors from the server for content that no longer exists.

I plan on changing this to use a smart redirector which can lookup old content and redirect to new with a plugin.


ToF

unread,
Oct 15, 2009, 10:21:21 AM10/15/09
to BoltWire
I was really surprised to see all you guys writing tons of messages,
trying to solve my problem !
and guess what, IT WORKS ! :-)

I only added an .htaccess file with the line "AddDefaultCharset
UTF-8".

Thanks a lot !!

ToF

unread,
Oct 15, 2009, 10:32:35 AM10/15/09
to BoltWire
Concerning the other problem:

In the page action.register, I want to replace these two lines:

[session authkey register]
[session register password,member]

by this one:

[session if "equal {=code} toto ? authkey=register ,
register=password,member"]

Surely, I have declared a textbox so that the guy can write a text,
corresponding to the "code":

[c]>>Passcode:<<
[c][text code]
[r]

It does not work. It says that the form has been submitted but it
seems not to create the login and thus it cannot log the guy, even if
the passcode is correct.

As you may have understood, I want people to *register* only if he
knows the passcode...

Any Idea ?


On 15 oct, 13:00, The Editor <edi...@fast.st> wrote:

The Editor

unread,
Oct 15, 2009, 2:22:25 PM10/15/09
to bolt...@googlegroups.com
I'd have to see your whole form to figure out what is wrong, but I got
this to work on my site just fine:

[messages]
[form]
[text code][submit]
[session if "equal {=code} mypass ? msg_1=yep , msg_2=hi there :
msg_1=nope , msg_2=good bye"]
[form]

Cheers,
Dan

P.S. It's always eager to debug if you can see the whole form. I can
just cut and paste and give it a whirl...

ToF

unread,
Oct 16, 2009, 3:24:55 AM10/16/09
to BoltWire
This is my form. It is almost the initial form in the page
action.register but I added a textbox for entering a passcode and then
I would like that the registration occurs only if the passcode is
correct. That's what I want to do with the line :
[session if "equal {=code} mycode ? authkey=register ,
register=password,member"]

And this does not work ...

! >>Register<<

[if ! login || admin]>>To create a new account, please choose a member
name and password<<

[form]
[t]
[r]
[c]>>Passcode:<<
[c][text code]
[r]
[c]>>Member:<<
[c][text member]
[r]
[c]>>Password:<<
[c][password password] [submit REGISTER]
[t]
[session if "equal {=code} mycode ? authkey=register ,
register=password,member"]
[if* ! login][session login]
[if*][form]
[if* admin]You are currently logged in as an Admin: {member}
[if*][else]You are already logged in as {member}.

[if]

The Editor

unread,
Oct 16, 2009, 5:19:22 AM10/16/09
to bolt...@googlegroups.com
Ok, here's the problem. When you add fields using the if command (like
authkey and register) they get appended to the end of the list in
terms of processing. So in your form, they try to login before they
are registered. If you change the form to this it will work:

! >>Register<<

[if ! login || admin]>>To create a new account, please choose a member
name and password<<

[form]
[t]
[r]
[c]>>Passcode:<<
[c][text code]
[r]
[c]>>Member:<<
[c][text member]
[r]
[c]>>Password:<<
[c][password password] [submit REGISTER]
[t]
[session if "equal {=code} mycode ? authkey=register ,

register=password,member[if* ! login] , login=''[if*] : warn=Incorrect
passcode."]


[form]
[if* admin]You are currently logged in as an Admin: {member}
[if*][else]You are already logged in as {member}.

[if]

This is a cool little snippet. We should add it to the BoltWire site
somewhere...

Cheers,
Dan

ToF

unread,
Oct 25, 2009, 2:54:37 PM10/25/09
to BoltWire
Any idea ??

The Editor

unread,
Oct 26, 2009, 2:20:30 PM10/26/09
to bolt...@googlegroups.com
On Sun, Oct 25, 2009 at 2:54 PM, ToF <christop...@gmail.com> wrote:
>
> Any idea ??

Did my suggestions not work? Can you clarify what is happening? Make
sure you remove any line breaks introduced by the email.

Cheers,
Dan

Reply all
Reply to author
Forward
0 new messages