Sign in to follow this  
Followers 0
Fegarur

Letras en japon

10 posts in this topic

Descripción:
Este script permite usar en el proyecto letras en japonés. Vosotros vereis qué hacer con ello. xD.png

Script:[spoiler]
CODE
module EasyConv
CP_ACP = 0
CP_UTF8 = 65001

#--------------------------------------------------------------------------
# ● S-JIS -> UTF-8
#--------------------------------------------------------------------------
def s2u(text)
m2w = Win32API.new('kernel32', 'MultiByteToWideChar', 'ilpipi', 'i')
w2m = Win32API.new('kernel32', 'WideCharToMultiByte', 'ilpipipp', 'i')

# S-JIS -> Unicode
len = m2w.call(CP_ACP, 0, text, -1, nil, 0);
buf = "\0" * (len*2)
m2w.call(CP_ACP, 0, text, -1, buf, buf.size/2);

# Unicode -> UTF-8
len = w2m.call(CP_UTF8, 0, buf, -1, nil, 0, nil, nil);
ret = "\0" * len
w2m.call(CP_UTF8, 0, buf, -1, ret, ret.size, nil, nil);

return ret
end
module_function :s2u
#--------------------------------------------------------------------------
# ● UTF-8 -> S-JIS
#--------------------------------------------------------------------------
def u2s(text)
m2w = Win32API.new('kernel32', 'MultiByteToWideChar', 'ilpipi', 'i')
w2m = Win32API.new('kernel32', 'WideCharToMultiByte', 'ilpipipp', 'i')

# UTF-8 -> Unicode
len = m2w.call(CP_UTF8, 0, text, -1, nil, 0);
buf = "\0" * (len*2)
m2w.call(CP_UTF8, 0, text, -1, buf, buf.size/2);

# Unicode -> S-JIS
len = w2m.call(CP_ACP, 0, buf, -1, nil, 0, nil, nil);
ret = "\0" * len
w2m.call(CP_ACP, 0, buf, -1, ret, ret.size, nil, nil);

return ret
end
module_function :u2s
end
[/spoiler]

Instrucciones:
+ Pega el script sobre Main.
+ EasyConv::s2u(texto) para S-JIS en UTF-8
+ EasyConv::u2s(texto) para UTF-8 en S-JIS

Crédito:
Autor desconocido.
0

Share this post


Link to post
Share on other sites
Dios kien va a usar este script?xD.png

->Pon una screen,entonces es como una fuente pero sin poner el formato fuente? blink.gif
0

Share this post


Link to post
Share on other sites
Os habreis dado cuenta, en los demos y ejemplos japoneses, que no podeis ver nada de lo que pone. Este script os permite verlo. Es casi un decodificador de la fuente.
0

Share this post


Link to post
Share on other sites
QUOTE(Fegarur @ Sep 5 2006, 05:38 PM)
Os habreis dado cuenta, en los demos y ejemplos japoneses, que no podeis ver nada de lo que pone. Este script os permite verlo. Es casi un decodificador de la fuente.
[right][snapback]1962[/snapback][/right]


Pues la verdad es k no te acabo de entender blink.gif ,pon una screen o una demo... blink.gif
0

Share this post


Link to post
Share on other sites
No tengo ni una cosa ni la otra y no estoy en condiciones de hacerlo ahora, pero... seguro que te a pasado. Un ejemplo de algo en japonés y lo único que ves son interrogaciones... Es una especie de convertidor.
0

Share this post


Link to post
Share on other sites
a mi me gustan los juegos en japones
y en mi proyecto estoy buscando 2 script
para poner español(ese no nesecito)
ingles(creo que el de sephirotspawn me ayude (como sale y que "S" ="N" creo que puedo poner "Hola"="HELLO"))
Y Japones(gracias fegarur pero con este me complico un poquito)
laugh.gif laugh.gif laugh.gif Edited by Bahamut_12
0

Share this post


Link to post
Share on other sites
Pos muy bueno el script yo si le hallo la utilidad cheesy.gif laugh.gif je je y claro me pasa eso de que no se ve nada cuando aparaecen los letreros de proyectos japoneses icon13.gif
0

Share this post


Link to post
Share on other sites
blink.gif impresionado.gif pero ke cosa y ¿como se escriben las letras ? blink.gif sorprendente ojomorado.gif
0

Share this post


Link to post
Share on other sites
Mmmmm...raro script, kreo k lo usare...nah, es koña xD.png no le encuentro utilidad unsure.gif
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0