I have Chinese characters that are represented by TwoByteString. When I put them in a URL and later attempt to decode the URL, the Chinese character string does not get reconstructed. For example; | url | url := Net.HttpURL host: 'host' pathString: 'http://host/seg/中文?ok=8'. url pathString '/http://host/seg/%4E2D%6587?ok=8' Terry =========================================================== Terry Raymond Crafted Smalltalk 80 Lazywood Ln. Tiverton, RI 02878 (401) 624-4517 [hidden email] =========================================================== _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Try to use URLEncoder to encode path tokens: URLEncoder encode: '中文?ok=8' -> '%E4%B8%AD%E6%96%87%3Fok%3D8' URLEncoder decode: '%E4%B8%AD%E6%96%87%3Fok%3D8' -> '中文?ok=8' Tamara Kogan Smalltalk Development Cincom Systems From: [hidden email] [mailto:[hidden email]] On Behalf Of Terry Raymond I have Chinese characters that are represented b!
y TwoByteString. When I put them in a
URL and later attempt to decode the URL, the Chinese character string does not get reconstructed. For example; | url | url := Net.HttpURL host: 'host' pathString: 'http://host/seg/中文?ok=8'. url pathString '/http://host/seg/%4E2D%6587?ok=8' Terry =========================!
================================== Terry Raymond Crafted Smalltalk 80 Lazywood Ln. Tiverton, RI 02878 (401) 624-4517 [hidden email] =========================================================== _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Tamara Thanks, that did it. Terry =========================================================== Terry Raymond Crafted Smalltalk 80 Lazywood Ln. Tiverton, RI 02878 (401) 624-4517 [hidden email] =========================================================== From: Kogan, Tamara [mailto:[hidden email]] Try to use URLEncoder to encode path tokens: URLEncoder encode: '中文?ok=8' -> '%E4%B8%AD%E6%96%87%3Fok%3D8' URLEncoder decode: '%E4%B8%AD%E6%96%87%3Fok%3D8' -> '中文?ok=8' Tamara Kogan Smalltalk Development Cincom Systems From: [hidden email] [hidden email] On Behalf Of Terry Raymond I have Chinese characters that are represented by TwoByteString. When I put them in a URL and later attempt to decode the URL, the Chinese character string does not get reconstructed. For example; | url | url := Net.HttpURL host: 'host' pathString: 'http://host/seg/中文?ok=8'. url pathString '/http://host/seg/%4E2D%6587?ok=8' Terry =========================================================== Terry Raymond Crafted Smalltalk 80 Lazywood Ln. Tiverton, RI 02878 (401) 624-4517 [hidden email] =========================================================== _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Kogan, Tamara
Why is it that #host:pathString: does not use the URLEncoder to encode the path? Terry =========================================================== Terry Raymond Crafted Smalltalk 80 Lazywood Ln. Tiverton, RI 02878 (401) 624-4517 [hidden email] =========================================================== From: Kogan, Tamara [mailto:[hidden email]] Try to use URLEncoder to encode path tokens: URLEncoder encode: '中文?ok=8' -> '%E4%B8%AD%E6%96%87%3Fok%3D8' URLEncoder decode: '%E4%B8%AD%E6%96%87%3Fok%3D8' -> '中文?ok=8' Tamara Kogan Smalltalk Development Cincom Systems From: [hidden email] [hidden email] On Behalf Of Terry Raymond I have Chinese characters that are represented by TwoByteString. When I put them in a URL and later attempt to decode the URL, the Chinese character string does not get reconstructed. For example; | url | url := Net.HttpURL host: 'host' pathString: 'http://host/seg/中文?ok=8'. url pathString '/http://host/seg/%4E2D%6587?ok=8' Terry =========================================================== Terry Raymond Crafted Smalltalk 80 Lazywood Ln. Tiverton, RI 02878 (401) 624-4517 [hidden email] =========================================================== _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
There is high priority AR to fix the URL encoding/decoding issues. The AR will be considered for 7.11. 50261: "Move Wave encoding handling of URI-encode/decode to base URI" Tamara Kogan Smalltalk Development Cincom Systems From: Terry Raymond [mailto:[hidden email]] Why is it that #host:pathString: does not use the URLEncoder to encode the path? Terry =========================================================== Terry Raymond Crafted Smalltalk 80 Lazywood Ln. Tiverton, RI 02878 (401) 624-4517 [hidden email] =========================================================== From: Kogan, Tamara [hidden email] Try to use URLEncoder to encode path tokens: URLEncoder encode: '�
BCfJ8?ok=8' -> '%E4%B8%AD%E6%
96%87%3Fok%3D8' URLEncoder decode: '%E4%B8%AD%E6%96%87%3Fok%3D8' -> '中文?ok=8' Tamara Kogan Smalltalk Development Cincom Systems From: [hidden email] [hidden email] On Behalf Of Terry Raymond I have Chinese characters that are represented by TwoByteString. When I put them in a URL and later attempt to decode the URL, the Chinese character string does not get reconstructed. For example; | url | url := Net.HttpURL &nbs
p; host: 'host' pathString: 'http://host/seg/中文?ok=8'. url pathString '/http://host/seg/%4E2D%6587?ok=8' Terry =========================================================== Terry Raymond Crafted Smalltalk 80 Lazywood Ln. Tiverton, RI 02878 (401) 624-4517 [hidden email] =========================================================== _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |