List Info

Thread: Bricolage and multibyte chars?




Bricolage and multibyte chars?
user name
2007-09-20 01:03:14
Hi,

I've installed bricolage 1.10.3, and in general I'm finding
it to be
quite a pleasure to use.

Now one thing I've been noticing is that when I name my
templates/elements/etc in Japanese, I hit character
conversion errors
every so often. They are not *that* frequent, but frequent
enough that
I'm pretty sure if I set this out to my clients, they won't
be too happy.

The error I'm getting is

   "Error converting data from UTF-8 to UTF-8"

I'm using UTF-8 as my character set, TT as my burner, and
Safari as my
browser.

Has anyone hit an error like this?

I'm suspecting some inconsistencies with variables being
UTF-8 flagged
or not within the app, but couldn't realy figure out where.

--d


Re: Bricolage and multibyte chars?
user name
2007-09-20 03:38:02
I think I've figured out a solution.

I tested this by putting various iterations of Data:umper
calls around
Bric::Util::CharTrans, and found out that before applying
any sort of
encoding conversion, the data being sent from Safari is
bogus. It's
definitely not UTF-8.

So then looking at the generated HTML source code, I noticed
that there
is not <meta http-equiv="content-type">
markup in the source -- so I
hardcoded this:

   <meta name="http-equiv"
content="text/html; charset=UTF-8" />

in

   comp/widgets/wrappers/sharky/header.mc

and voila, the errors went away.

I haven't extensively tested this with other browsers, but
If I'm right,
I suspect that something like this should be put on all
pages, anyway.


--d


Daisuke Maki wrote:
> Hi,
> 
> I've installed bricolage 1.10.3, and in general I'm
finding it to be
> quite a pleasure to use.
> 
> Now one thing I've been noticing is that when I name
my
> templates/elements/etc in Japanese, I hit character
conversion errors
> every so often. They are not *that* frequent, but
frequent enough that
> I'm pretty sure if I set this out to my clients, they
won't be too happy.
> 
> The error I'm getting is
> 
>    "Error converting data from UTF-8 to
UTF-8"
> 
> I'm using UTF-8 as my character set, TT as my burner,
and Safari as my
> browser.
> 
> Has anyone hit an error like this?
> 
> I'm suspecting some inconsistencies with variables
being UTF-8 flagged
> or not within the app, but couldn't realy figure out
where.
> 
> --d
> 
> 


Re: Bricolage and multibyte chars?
user name
2007-09-20 04:26:05
Daisuke Maki wrote:

> I haven't extensively tested this with other browsers,
but If I'm right,
> I suspect that something like this should be put on all
pages, anyway.

I've done some testing myself and I agree with you. So
you've now joined 
the list of people with an entry in the Bric::Changes file,
SVN commit 7977

Include meta-equiv tag in the header to set the charset to
be UTF-8 if 
it is the only charset loaded in C<$LOAD_CHAR_SETS>.
Reported by Daisuke 
Maki.

regards,

Paul

Re: Bricolage and multibyte chars?
user name
2007-09-20 05:19:23
On Thu, 20 Sep 2007, Paul Orrock wrote:
> Daisuke Maki wrote:
> I've done some testing myself and I agree with you. So
you've now joined the 
> list of people with an entry in the Bric::Changes file,
SVN commit 7977

added also to:
  lib/Bric/License.pod
  comp/widgets/help/debuggers.html

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )