MoonWolfe$B$G$9!#e(B
win32/registry.rbe$B$Ne(Bwtimee$B$GICL$K~$,@Z$j<N$F$i$l$F$?$N$Ge(B
e$B%Q%C%A$r=q$$$F$_$^$7$?!#e(B
usece$B$G$b@:EYB-$j$J$$$N$Ge(Bwtimee$B"*e(BTimee$B"*e(Bwtimee$B$,$&$^$/$$$-$^$;$s$,e(B
e$BICC10L$h$j$+$O%^%7$@$H;W$$$^$9!#e(B
e$BJL7o$K$J$j$^$9$,%f%K%3!<%IBP1~$7$F$J$$$+$iJ8;z2=$1$,$?$^$K5/$-$^$9$M!#e(B
e$B%l%8%9%H%j$r%@%s%W$9$k%W%m%0%i%`$rAH$b$&$H$7$FVH$j$^$7$?e(B^^;
Index: registry.rb
— registry.rb (revision 12112)
+++ registry.rb (working copy)
@@ -511,11 +511,11 @@
end
def self.wtime2time(wtime)
e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B
In message “Re: [ruby-dev:30655] win32/registry wtime”
on Wed, 21 Mar 2007 01:40:05 +0900, [email protected] writes:
|# e$BJL7o$K$J$j$^$9$,%f%K%3!<%IBP1~$7$F$J$$$+$iJ8;z2=$1$,$?$^$K5/$-$^$9$M!#e(B
|# e$B%l%8%9%H%j$r%@%s%W$9$k%W%m%0%i%`$rAH$b$&$H$7$FVH$j$^$7$?e(B^^;
e$B$^!“e(BUnicodee$BBP1~$7$F$$$k$H$&$?$C$F$k8@8l$G$bJ8;z2=$1$OH/@8$7e(B
e$B$F$k$$?$$$G$9$7$M!#$G!":#2s$O$I$N$h$&$J7P0^$GJ8;z2=$1$7$^$7e(B
e$B$?$+!#F1$8$h$&$JLdBj$,:#8eH/@8$7$J$$$h$&$J;EAH$$r9M$($k%R%se(B
e$B%H$K$7$?$$$N$G!”$<$R65$($F$/$@$5$$!#e(B
win32/registry.rb e$B$r=q$$$?e(B Tietew e$B$G$9!#e(B
On Wed, 21 Mar 2007 19:08:04 +0900
In article [email protected]
[[ruby-dev:30658] Unicodee$BBP1~$HJ8;z2=$1e(B(Re: win32/registry wtime)]
Yukihiro M. [email protected] wrote:
|# e$BJL7o$K$J$j$^$9$,%f%K%3!<%IBP1~$7$F$J$$$+$iJ8;z2=$1$,$?$^$K5/$-$^$9$M!#e(B
|# e$B%l%8%9%H%j$r%@%s%W$9$k%W%m%0%i%`$rAH$b$&$H$7$FVH$j$^$7$?e(B^^;
e$B$^!“e(BUnicodee$BBP1~$7$F$$$k$H$&$?$C$F$k8@8l$G$bJ8;z2=$1$OH/@8$7e(B
e$B$F$k$$?$$$G$9$7$M!#$G!":#2s$O$I$N$h$&$J7P0^$GJ8;z2=$1$7$^$7e(B
e$B$?$+!#F1$8$h$&$JLdBj$,:#8eH/@8$7$J$$$h$&$J;EAH$$r9M$($k%R%se(B
e$B%H$K$7$?$$$N$G!”$<$R65$($F$/$@$5$$!#e(B
e$B:#$Ne(B win32/registry.rb
e$B$Oe(BANSIe$B$Ne(BAPIe$B$r8F$s$G$$$k$N$G!"e(B
e$B%+%l%s%H%m%1!<%kHO0O30$NJ8;z$,e(B ?
e$B$KJQ2=$7$F$7$^$&$N$@$H;W$$$^$9!#e(B
e$B8F$Ve(BAPIe$B$re(B Unicode
e$B$N$b$N$K$9$l$P!“$d$j$H$j$9$kJ8;zNs$r$Oe(B UTF-16
e$B$J$N$G!”$"$H$OJQ4985!&@h$NJ8;z%(%s%3!<%G%#%s%0$5$(7h$^$l$PJQ49$Oe(B
e$B$=$l$[$I6l$G$b$J$$$+$H!#e(B
e$B$"!<$G$be(B mswin32 e$B$K$OI8=`$Ge(B iconv.so
e$B$H$+IU$$$F$J$$$s$G$9$h$M!#e(B
e$B$I$&$7$?$i$$$$$s$@$m$&!#$X$?$Je(B libiconv e$B;H$&$He(B Windows-31J
e$B$,;He(B
e$B$($J$$$7!D!De(B
e$B$3$s$K$A$O!"$J$+$`$ie(B(e$B$&e(B)e$B$G$9!#e(B
In message “[ruby-dev:30659] Re: Unicodee$BBP1~$HJ8;z2=$1e(B(Re:
win32/registry wtime)”
on Mar.21,2007 20:07:55, [email protected] wrote:
| e$B8F$Ve(BAPIe$B$re(B Unicode e$B$N$b$N$K$9$l$P!“$d$j$H$j$9$kJ8;zNs$r$Oe(B UTF-16
| e$B$J$N$G!”$“$H$OJQ4985!&@h$NJ8;z%(%s%3!<%G%#%s%0$5$(7h$^$l$PJQ49$Oe(B
| e$B$=$l$[$I6l$G$b$J$$$+$H!#e(B
|
| e$B$”!<$G$be(B mswin32 e$B$K$OI8=`$Ge(B iconv.so e$B$H$+IU$$$F$J$$$s$G$9$h$M!#e(B
| e$B$I$&$7$?$i$$$$$s$@$m$&!#$X$?$Je(B libiconv e$B;H$&$He(B Windows-31J e$B$,;He(B
| e$B$($J$$$7!D!De(B
win32/registrye$B$,FbIt$GJQ49$^$G9T$&$N$O$I$&$J$s$+$J!<!"$H$$$&e(B
e$B5$$,$7$^$9!#e(B
e$B$I$C$A$K$7$me(BUTF-16e$B$+$iLa$9$H$-$K2=$1$k$+Nc305/$-$k$+$J$o$1$Ge(B
e$B$9$7!#e(B
e$B$I$C$A$+$H$$$&$H!“I,MW$G$”$k$N$J$i$Pe(BUnicodee$B$Je(BAPIe$B$r8F$V%$%s%?e(B
e$B!<%U%‘!<%9$bMQ0U$7$F!“A08e$N=hM}$O8F$s$@?M$K$^$+$;$?J}$,$$$$e(B
e$B$N$+$J$”!“$H;W$$$^$9!#e(B
e$B>-Mhe(Bm17ne$B$,F~$C$?$i!”$I$C$A$N%$%s%?!<%U%’!<%9$r;H$&$+$/$i$$$Oe(B
e$B<+F0H=Dj$G$-$k$h$&$K$b$J$k$G$7$g$&!#e(B
e$B$=$l$G$O!#e(B
le$BLZB<$G$9!#e(B
e$B<+F0$GJQ49$9$Y$-$+$I$&$+$O!J$&!K$5$s!"@.@%$5$s$HF1$80U8+$G$9!#e(B
e$B$G!"e(B
07/03/21 e$B$Ke(B Tietew[email protected]
e$B$5$s$O=q$-$^$7$?e(B:
e$B8F$Ve(BAPIe$B$re(B Unicode e$B$N$b$N$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$G$9$7!"e(B
UTF-8e$B$X$J$ie(Bstr.unpack(‘n*’).pack(‘U*’)e$B$GJQ49$G$-$^$9$+$i!#e(B
e$B%5%m%2!<%H%Z%"$O$3$l$@$H$@$a$G$9$1$Ie(B
e$B@.@%$G$9!#e(B
e$B$-$`$i$3$&$$$Ae(B wrote:
e$BLZB<$G$9!#e(B
07/03/22 e$B$Ke(B NARUSE, Yui[email protected] e$B$5$s$O=q$-$^$7$?e(B:
e$B$o$6$o$6e(BANSIe$B$+$ie(BUnicodee$B$KJQ49$7$J$/$F$b!"e(B
e$B:G=i$+$ie(BANSIe$BHG$Ne(BAPIe$B$r8F$Y$P$$$$$N$G$O$J$$$G$7$g$&$+!#e(B
e$B8=>u$Ge(BAe$BHG$r8F$S=P$7$F$$$F!"7k2Le(Bmoonwolfe$B$5$s$N$$$&J8;z2=$1$,e(B
e$B5/$-$F$$$k$H;W$C$F$$$?$N$G$9$,0c$$$^$9e(B?
e$B$o$?$7$b$=$l$G@5$7$$$H;W$C$F$$$^$9$,!"e(B
e$B$=$NJ8;z2=$1$N5/$-$k%1!<%9$G$O!"L@<(E*$KJQ49$7$F$b2=$1$k$+$H!#e(B
e$B%U%)!<%k%P%C%/=hM}$,$G$-$k$H$$$&DxEY$NMxE@$K$J$k$+$H;W$$$^$9!#e(B
MultiByteToWideChar e$B$He(B WideCharToMultiByte e$B$re(B Ruby
e$B$+$iC!$1$ke(B
e$B%i%$%V%i%j$NDs0F$J$N$G$7$?$i!“$=$l$J$j$K0U5A$O$”$k$+$b$7$l$^$;$s!#e(B
On Wed, 21 Mar 2007 22:11:11 +0900
In article [email protected]
[[ruby-dev:30661] Re: Unicodee$BBP1~$HJ8;z2=$1e(B(Re: win32/registry
wtime)]
“NARUSE, Yui” [email protected] wrote:
e$B$J$+$`$i$5$s$HF10U8+$G!“e(B
e$BJQ49$;$:$K$=$N$^$^e(BUTF-16e$B$rJV$9%a%=%C%I$@$1$”$l$P$h$$$H;W$$$^$9!#e(B
e$B$=$&$G$9$M!#$"$^$jJQ$J$3$H$O9M$($J$$J}$,$$$$$G$9$M!#e(B
UTF-8e$B$X$J$ie(Bstr.unpack(‘n*’).pack(‘U*’)e$B$GJQ49$G$-$^$9$+$i!#e(B
Win32e$B$O%j%H%k%(%s%G%#%"%s$J$N$G!"e(Bv* e$B$@$H;W$$$^$9!#e(B
MoonWolfã§ã™ã€‚
Yukihiro M. [email protected]:
|# 別件ã«ãªã‚Šã¾ã™ãŒãƒ¦ãƒ‹ã‚³ãƒ¼ãƒ‰å¯¾å¿œã—ã¦ãªã„ã‹ã‚‰æ–‡å—化ã‘ãŒãŸã¾ã«èµ·ãã¾ã™ã。
|# レジストリをダンプã™ã‚‹ãƒ—ãƒã‚°ãƒ©ãƒ を組もã†ã¨ã—ã¦åµŒã‚Šã¾ã—ãŸ^^;
ã¾ã€Unicode対応ã—ã¦ã„ã‚‹ã¨ã†ãŸã£ã¦ã‚‹è¨€èªžã§ã‚‚æ–‡å—化ã‘ã¯ç™ºç”Ÿã—
ã¦ã‚‹ã¿ãŸã„ã§ã™ã—ã。ã§ã€ä»Šå›žã¯ã©ã®ã‚ˆã†ãªçµŒç·¯ã§æ–‡å—化ã‘ã—ã¾ã—
ãŸã‹ã€‚åŒã˜ã‚ˆã†ãªå•é¡ŒãŒä»Šå¾Œç™ºç”Ÿã—ãªã„よã†ãªä»•çµ„ã¿ã‚’考ãˆã‚‹ãƒ’ン
トã«ã—ãŸã„ã®ã§ã€ãœã²æ•™ãˆã¦ãã ã•ã„。
Windowsã®ãƒ¬ã‚¸ã‚¹ãƒˆãƒªå†…部ã¯å…¨ã¦ãƒ¦ãƒ‹ã‚³ãƒ¼ãƒ‰ã§è¨˜éŒ²ã•ã‚Œã¦ã„ã¾ã™ã€‚
ç¾çŠ¶ã®win32/registryã§å‘¼ã³å‡ºã—ã¦ã„ã‚‹ANSI版ã®APIã§ã¯
ANSI(CP932)書ãè¾¼ã¿â†’内部(UCS2)→ANSI(CP932)èªã¿è¾¼ã¿ã¨ã„ã†é¢¨ã«ãªã‚Šã¾ã™ã€‚
CP932ã—ã‹ä½¿ã‚ãªã„ã®ã§ã‚ã‚Œã°å…¨ãå•é¡Œã¯ã‚ã‚Šã¾ã›ã‚“。
今回発生ã—ãŸæ–‡å—化ã‘ã¯ãƒ¬ã‚¸ã‚¹ãƒˆãƒªã®ãƒãƒƒã‚¯ã‚¢ãƒƒãƒ—/リストア処ç†ã§èµ·ãã¾ã—ãŸã€‚
レジストリをèªã¿å‡ºã™æ®µéšŽã§CP932ã«ç„¡ã„æ–‡å—㯒?'ã«ç½®ãæ›ãˆã‚‰ã‚Œã¦ã—ã¾ã„ã¾ã™ã€‚
ãã®ãŸã‚ã€èªã¿è¾¼ã‚“ã 値をãã®ã¾ã¾æ›¸ã戻ã™ã¨ã„ã†ã“ã¨ãŒã§ãã¾ã›ã‚“ã§ã—ãŸã€‚
ã¨ã‚Šã‚ãˆãšæ˜Žç¤ºçš„ã«ãƒ¦ãƒ‹ã‚³ãƒ¼ãƒ‰ã§èªã¿æ›¸ãã™ã‚‹ãƒ¡ã‚½ãƒƒãƒ‰ã‚’è¿½åŠ ã—ã¦ã¿ã¾ã—ãŸã€‚
readã®UTF-8版ã¨ã—ã¦read_utf8ã€writeã«ã¯write_utf8ã¨ã„ã†ã®ã‚’è¿½åŠ ã—ã¦ã„ã¾ã™ã€‚