Skip navigation

This week I (re)started using Catalyst.

I used Catalyst for a project around 2003-4, and can’t really remember anything.

At the time I used Tangram as ORM, but now I’m starting with DBIx::Class (mainly because docs are using that and I want to get on coding without need to check the docs as fast as possible).

Today, after fiddling yesterday with models, controllers and views with mock-up data for a while to get around the idea of Catalyst’s MVC perlish implementation I started developing the real project and stumbled upon encodings.

As I live in Japan, the DB is encoded in Shift-JIS, and HTML content must also be served using that encoding.

I found C::P::Charsets::Japanese, but all it does is simply change the encode of the response (to whatever you set as “in” -code, views, etc-, and “out” encodings). But is not really optimal, since the DB data is “in”, and already in SJIS.

Simply feeding the views with the DB data turns it into garbage. And I usually have the templates in SJIS.

Maybe when I retrieve data I must create a recordset what encodes it to utf to use it internally?
And user POST/GET data must be also re-encoded?

still not sure what the right approach is.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: