php-i18n Digest 30 Jul 2003 22:24:36 -0000 Issue 185

Topics (messages 592 through 593):

Re: kakasi & PHP
        592 by: Moriyoshi Koizumi

Encoding Japanese characters.
        593 by: Inwards

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Hi,

Kakasi extension is available in PECL.

http://cvs.php.net/pecl

If you are using one of *nix-like OS's (Linux, FreeBSD, and whatsoever),

You can fetch it with the following command:

(In contrast to the standard modules like APC, this module cannot be
installed via "pear" command.)

$ cvs -d:pserver:[EMAIL PROTECTED]:/repository co pecl/kakasi
$ cd pecl/kakashi
$ phpize
$ ./configure
$ make
$ make install

- SYNOPSIS -
<?php
  // string kakasi(string input, array options)
  // This function may accept the same options as the command line.

  $result = kakasi("some japanese text in EUC-JP", array("-JH", "-KH"));
?>

BTW I'm not the author of this extension, so I don't seem to be the right 
person to ask further questions :)

Anyway, hope this helps.

Moriyoshi

"Simon Dedeyne" <[EMAIL PROTECTED]> wrote:

> I would like to use kakasi functionality with PHP, but right now the
> only way to do this would be running the kakasi program in shell or
> using PERL text:kakasi. 
> Are there any alternatives, or people who have experience how to get php
> & kakasi up and working smooth?
>  
> thanks,
> Simon


--- End Message ---
--- Begin Message ---
Okay, I've been reading whatever documentation I can find on this subject
and I feel hopelessly lost.  Here is what I am trying to do:

- I have a string containing a Japanese phrase.  mb_detect_encoding()
reports it as SJIS.
- I want to display this string in HTML without changing the encoding type
(ISO-8859-1).
- In order to accomplish this, I would like to encode the text as Unicode
values.  I have seen a nice example of this in action here:
http://www.animenewsnetwork.com/encyclopedia/anime.php?id=4 so I know that
it is possible.

Question:  How???  I'm probably just dim, but I've tried a number of
different methods and have drawn a complete blank.

Help!





--- End Message ---

Reply via email to