Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] utf form problems



On Wednesday 27 February 2008 17:24, steven smith wrote:
>Thanks Daniel.  I haven't had much time to look at the code
>much yet, but to me it looks very well written and
>documented.  I did notice the calls to encode though...

Yeah, i did a whole bunch of reading about encodings. If you have a lot 
of spare hours and want to understand encodings more deeply than most 
people find necessary, i highly recommend reading _CJKV Information 
Processing_ from front to back. If you do that, plan on clearing your 
schedule for awhile though; it is truly a large book. Later i found out 
that Perl makes it so easy i would not have had to have spent so much 
time worrying about the details of encodings. I suppose having the 
background knowledge will help if i switch programming languages, so it 
was not time wasted.

The code for that program is a bit messy to me, mostly because i tried 
to define the transliteration tables it uses programmatically. It would 
probably be easier to comprehend (and almost certainly initialize much 
faster) if i'd simply generated the table once by hand and defined it 
as a variable directly. I've never learned mod_perl, but if i do my 
first project will be to take the kana program and make it run under 
mod_perl such that it only has to do the initialization once for each 
time Apache is restarted. I *think* that's the main advantage mod_perl 
gives anyway.

If i recall correctly, &encode is not a real function; i think it is 
defined early on as an alias to the real &encode_SOMETHING functions 
that i use. Other than that i hope it appears fairly straightforward.

------------------------------------------------------------------------
Dan Ramaley                            Dial Center 118, Drake University
Network Programmer/Analyst             2407 Carpenter Ave
+1 515 271-4540                        Des Moines IA 50311 USA


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links