{"id":3445,"date":"2022-08-10T17:45:35","date_gmt":"2022-08-10T08:45:35","guid":{"rendered":"http:\/\/oohito.com\/nqthm\/?p=3445"},"modified":"2022-08-10T17:45:35","modified_gmt":"2022-08-10T08:45:35","slug":"windows-10-%e7%89%88%e3%81%aepharo-%e3%81%a7%e6%97%a5%e6%9c%ac%e8%aa%9e%e3%81%ae%e3%83%87%e3%82%a3%e3%83%ac%e3%82%af%e3%83%88%e3%83%aa%e5%90%8d%e3%82%92%e5%90%ab%e3%82%93%e3%81%a0%e3%83%95%e3%82%a9","status":"publish","type":"post","link":"https:\/\/oohito.com\/nqthm\/archives\/3445","title":{"rendered":"Windows 10 \u7248\u306ePharo \u3067\u65e5\u672c\u8a9e\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d\u3092\u542b\u3093\u3060\u30d5\u30a9\u30eb\u30c0\u304b\u3089\u8d77\u52d5\u3067\u304d\u308bVM\u3092\u30d3\u30eb\u30c9\u3059\u308b\u4ef6"},"content":{"rendered":"\n<p>\uff082022.8.11 \u8ffd\u8a18\uff09<br \/>manifest \u3092\u4fee\u6b63\u3059\u308c\u3070\u3001\u65b0\u305f\u306aVM\u3092\u4f5c\u3089\u306a\u304f\u3066\u3082\u826f\u3044\u3053\u3068\u304c\u308f\u304b\u3063\u305f\u306e\u3067\u3001\u3053\u306e\u8a18\u4e8b\u306f\u4e0d\u8981\u3068\u306a\u3063\u305f\u3002<a href=\"http:\/\/oohito.com\/nqthm\/archives\/3447\" data-type=\"post\" data-id=\"3447\">\u6b21\u306e\u8a18\u4e8b<\/a>\u3092\u898b\u3088\u3002<\/p>\n\n\n<!--more-->\n\n\n<p>\u30bf\u30a4\u30c8\u30eb\u9577\u3044\u3002<\/p>\n\n\n<p><a href=\"http:\/\/oohito.com\/nqthm\/archives\/3437\" data-type=\"post\" data-id=\"3437\">\u524d\u56de\u306e\u8a18\u4e8b<\/a>\u306b\u3066\u3001Windows 10 \u3067\u65e5\u672c\u8a9e\u3092\u542b\u3093\u3060\u30d5\u30a9\u30eb\u30c0\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b Pharo \u30b7\u30b9\u30c6\u30e0\u3092\u8d77\u52d5\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3001\u3046\u307e\u304f\u3044\u304b\u306a\u3044\u4ef6\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u305f\u3002<\/p>\n\n\n<p>\u8981\u3059\u308b\u306b\u3001\u7d20\u306eWindows 10\u3067\u306f\u30a2\u30d7\u30ea\u3078\u5f15\u304d\u6e21\u3059\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u30d1\u30b9\u304cShift JIS \u306a\u306e\u306b\u5bfe\u3057\u3066\u3001Pharo VM \u3067\u306fUTF-8\u304c\u6765\u308b\u3053\u3068\u3092\u60f3\u5b9a\u3057\u3066\u3044\u308b\u3053\u3068\u306b\u8d77\u56e0\u3059\u308b\u554f\u984c\u3060\u3063\u305f\u3002<br \/>\uff08CJK\u4ee5\u5916\u3067\u306f\u304d\u3063\u3068\u554f\u984c\u306b\u306a\u3089\u306a\u3044\u306e\u3067\u3057\u3087\u3046\uff09<\/p>\n\n\n<p>\u3044\u308d\u3044\u308d\u8a66\u3057\u305f\u7d50\u679c\u3001VM \u3092\u8aad\u307f\u8fbc\u3080\u969b\u306b\u30d5\u30a1\u30a4\u30eb\u540d\u3092 Shift-JIS \u304b\u3089 UTF-8 \u306b\u5909\u66f4\u3059\u308c\u3070\u4e07\u4e8b\u89e3\u6c7a\u3059\u308b\u3053\u3068\u304c\u308f\u304b\u3063\u305f\u3002<\/p>\n\n\n<p>\u5909\u66f4\u7b87\u6240\u306f src\/client.c \u3060\u3051\u3002diff \u3057\u305f\u3082\u306e\u3092\u4e0b\u306b\u8a18\u8f09\u3059\u308b\u3002<\/p>\n\n\n<pre class=\"wp-block-code\"><code>*** src\/client.c\t2022-07-30 16:34:45.625821758 +0900\n--- changes4\/client.c\t2022-08-10 17:03:13.256402934 +0900\n***************\n*** 207,213 ****\n--- 207,227 ----\n      sqImageFile imageFile = NULL;\n      \/* Open the image file. *\/\n+ #ifdef _WIN32\n+     size_t acpLength = strlen(fileName);\n+     int utf16Length = MultiByteToWideChar(CP_ACP, 0, fileName, acpLength, NULL, 0);\n+\n+     WCHAR *utf16String = (WCHAR*)alloca((utf16Length + 1) * 2);\n+     MultiByteToWideChar(CP_ACP, 0, fileName, acpLength, utf16String, utf16Length + 1);\n+\n+     int utf8Length = WideCharToMultiByte(CP_UTF8, 0, utf16String, utf16Length, NULL, 0, NULL, FALSE);\n+     char *utf8filename = (char*)alloca(utf8Length + 1);\n+     WideCharToMultiByte(CP_UTF8, 0, utf16String, utf16Length, utf8filename, utf8Length + 1, NULL, FALSE);\n+\n+     imageFile = sqImageFileOpen(utf8filename, \"rb\");\n+ #else\n      imageFile = sqImageFileOpen(fileName, \"rb\");\n+ #endif\n      if(!imageFile)\n  \t{\n      \tlogErrorFromErrno(\"Opening Image\");\n***************\n*** 223,229 ****\n      sqImageFileClose(imageFile);\n      char* fullImageName = alloca(FILENAME_MAX);\n! \tfullImageName = getFullPath(fileName, fullImageName, FILENAME_MAX);\n      setImageName(fullImageName);\n--- 237,247 ----\n      sqImageFileClose(imageFile);\n      char* fullImageName = alloca(FILENAME_MAX);\n! #ifdef _WIN32\n!     fullImageName = getFullPath(utf8filename, fullImageName, FILENAME_MAX);\n! #else \/* _WIN32 *\/\n!     fullImageName = getFullPath(fileName, fullImageName, FILENAME_MAX);\n! #endif \/* _WIN32 *\/\n      setImageName(fullImageName);\n <\/code><\/pre>\n\n\n<p>\u305f\u3076\u3093\u3053\u308c\u3067OK\u306a\u306f\u305a\u3002\u304a\u76c6\u958b\u3051\u305f\u3089\u3044\u308d\u3044\u308d\u306a\u74b0\u5883\u3067\u8a66\u3057\u3066\u307f\u308b\u3064\u3082\u308a\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uff082022.8.11 \u8ffd\u8a18\uff09manifest \u3092\u4fee\u6b63\u3059\u308c\u3070\u3001\u65b0\u305f\u306aVM\u3092\u4f5c\u3089\u306a\u304f\u3066\u3082\u826f\u3044\u3053\u3068\u304c\u308f\u304b\u3063\u305f\u306e\u3067\u3001\u3053\u306e\u8a18\u4e8b\u306f\u4e0d\u8981\u3068\u306a\u3063\u305f\u3002\u6b21\u306e\u8a18\u4e8b\u3092\u898b\u3088\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38],"tags":[],"class_list":["post-3445","post","type-post","status-publish","format-standard","hentry","category-pharo"],"_links":{"self":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts\/3445","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/comments?post=3445"}],"version-history":[{"count":0,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts\/3445\/revisions"}],"wp:attachment":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/media?parent=3445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/categories?post=3445"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/tags?post=3445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}