digitalmars.D.learn - UTF8 Encoding: Again
digitalmars.D.learn-UTF8符号化:再び


Tue, 9 Aug 2005 19:49:17 +0000 (UTC) jicman <jicman_member xx pathlink.com> writes:
2005年8月9日(火)の19:49:17+0000(UTC)jicman<jicman_member xx pathlink.com>は以下の宛て先に書きます:


Greetings!
挨拶!

Sorry about this, but I have found a wall with UTF8, again. Perhaps, some of
すみませんが(これに関して)、私は、再びUTF8を備えた壁を見つけました。恐らく、いくらか、の
you may be able to help me jump it or break through it.
私がそれによってそれまたは破損をジャンプするのを助けることができるかもしれません。

I have this code,
私はこのコードを持っています、
char[] GetMonthDigit(char[] mon)
炭 GetMonthDigit([]) (炭[]mon)
{
{
char [][char[]] sMon;
炭[][炭[]sMon];
sMon["a??t"] = "08";
sMon「a]」 t=「08」;
return sMon[mon];
sMon[mon]を返します;
}
}

if I call this from within the program
私がプログラムの内部からこれを呼ぶ場合

char[] mon = GetMonthDigit("a??t");
炭 mon=GetMonthDigit([])(「a t」);

mon will have "08", however if it comes from another text file, say an ASCII
それが別のテキストファイルから来る場合しかしながら、monは「08」を持つだろう、とASCIIが言います。
file, it fails. So, if you take a look at this small piece of code,
ファイル、それは失敗します。そのように、コードのこの小さな部品を見る場合、

import std.stream;
輸入規格流れ;
void main()
無効のメイン()
{
{
char[] fn = "test.log";
炭 fn=([])「test.log」;
char[] txt = "ao??t";
炭 []txt=「ao; t」
File log = new File(fn,FileMode.Append);
ファイル丸木=新しいファイル;(fn、FileMode.Append)
log.writeLine(txt);
log.writeLine(txt);
log.close();
log.close ();
}
}

this will create a file, if it does not exists, called test.log after compile
それがしない場合、これはファイルを作成するでしょう、後にtest.logと呼ばれて、存在する、コンパイルする。
and run, and it will write, supposely, the content of txt. However, when you
そして、走ってください。そうすれば、それは、supposelyに、txtの内容を書くでしょう。しかしながら、いつ、あなた
open the test.log file, the content of it is,
test.logファイルを開く、その内容はそうです、

ao??t
ao t

Hmmmm... I tried setting the editor settings to UTF8, and others, however,
Hmmmm...Iは、UTF8にエディター・セッティングをセットしてみました、また他のもの、しかしながら、
nothing has worked. Any ideas how I can fix this?
何も作動していません。私がどのようにこれを固定することができるかという任意の考え?

thanks,
ありがとう、

jos?Ebr>
jos?Ebr>



Tue, 9 Aug 2005 21:07:18 +0000 (UTC) Stefan <Stefan_member xx pathlink.com> writes:
2005年8月9日(火)の21:07:18+0000(UTC)ステファン<Stefan_member xx pathlink.com>は以下の宛て先に書きます:

> ... However, when you
>...しかしながら、いつ、あなた
> open the test.log file, the content of it is,
>test.logファイルを開く、その内容はそうです、
>
>
>ao??t
>ao、t

Seems correct to me: 'ao?t' is 61 6f c3 bb 74 in binary which will be
私に正確に見えます:「ao?t」は61 6fのc3 bb 74です、の中で、2進法、どれがあるでしょうか。
interpreted as 'ao??t' in ASCII mode. So I think the editor that you
解釈された、として「ao、t」ASCIIモードの中で。したがって、私はエディターを思います、あなた
use to view the file is the problem. A lot of editors (e.g. Notepad)
ファイルを見る使用は問題です。多くのエディター(例えばノートパッド)
need a 'magic' byte order mark (BOM) in the beginning of the file to be able to
有能なファイルの最初に「マジック」バイトオーダー・マーク(BOM)を必要とします。
recognize an UTF8 file. For example, the (Notepad) BOM for UTF8 is
UTF8ファイルを認識してください。例えば、UTF8のための(ノートパッド)BOMはそうです。
ef bb bf. Delete these with an hex editor and it'll give you the same
F bbボールドフェース。魔力エディターとこれらを削除してください。そうすれば、それはあなたに同じ物を与えるでしょう。
output. Anyways, you have to make sure that you read/interpret your
出力。何としても、読む/解釈することを確かめなければなりません、あなたの
UTF8 file as UTF8, not ASCII.
ASCIIではなくUTF8としてのUTF8ファイル。

HTH,
HTH、
Stefan
ステファン



In article <ddb1bt$bcp$1 xx digitaldaemon.com>, jicman says...
記事<ddb1bt$bcp$1 xx digitaldaemon.com>では、jicmanは言います...
>
>
>
>
>Greetings!
>挨拶!
>
>
>Sorry about this, but I have found a wall with UTF8, again. Perhaps, some of
>すみませんが(これに関して)、私は、再びUTF8を備えた壁を見つけました。恐らく、いくらか、の
>you may be able to help me jump it or break through it.
>私がそれによってそれまたは破損をジャンプするのを助けることができるかもしれません。
>
>
>I have this code,
>Iはこのコードを持っています、
>char[] GetMonthDigit(char[] mon)
>炭[]GetMonthDigit(炭[]mon)
>{
>{
>char [][char[]] sMon;
>炭[][炭[]sMon];
>sMon["ao?t"] = "08";
>sMon[「ao?t]」=「08」;
>return sMon[mon];
>リターンsMon[mon];
>}
>}
>
>
>if I call this from within the program
>Iがプログラムの内部からこれを呼ぶ場合
>
>
>char[] mon = GetMonthDigit("ao?t");
>炭[]mon=GetMonthDigit(「ao?t」);
>
>
>mon will have "08", however if it comes from another text file, say an ASCII
>しかしながら、それが別のテキストファイルから来る場合、monは「08」を持ち、ASCIIと言います。
>file, it fails. So, if you take a look at this small piece of code,
>ファイル、それは失敗します。そのように、コードのこの小さな部品を見る場合、
>
>
>import std.stream;
輸入規格流れ(>);
>void main()
無効のメイン()(>)
>{
{(>)
>char[] fn = "test.log";
炭(>)[]fn=「test.log」;
>char[] txt = "ao?t";
炭(>)[]txt=「ao?t」;
>File log = new File(fn,FileMode.Append);
ファイル丸木=新しいファイル(>);(fn、FileMode.Append)
>log.writeLine(txt);
log.writeLine(>);(txt)
>log.close();
log.close()(>);
>}
>}
>
>
>this will create a file, if it does not exists, called test.log after compile
>それがしない場合、これはファイルを作成するでしょう、後にtest.logと呼ばれて、存在する、コンパイルする。
>and run, and it will write, supposely, the content of txt. However, when you
>そして実行、また、それは書くでしょう、supposely(txtの内容)。しかしながら、いつ、あなた
>open the test.log file, the content of it is,
>test.logファイルを開く、その内容はそうです、
>
>
>ao??t
>ao、t
>
>
>Hmmmm... I tried setting the editor settings to UTF8, and others, however,
>Hmmmm...私は、UTF8にエディター・セッティングをセットしてみました、また他のもの、しかしながら、
>nothing has worked. Any ideas how I can fix this?
>何も作動していません。私がどのようにこれを固定することができるかという任意の考え?
>
>
>thanks,
>ありがとう、
>
>
>jos?Ebr> >
>jos?Ebr> >
>
>




Tue, 9 Aug 2005 21:32:18 +0000 (UTC) Stefan <Stefan_member xx pathlink.com> writes:
2005年8月9日(火)の21:32:18+0000(UTC)ステファン<Stefan_member xx pathlink.com>は以下の宛て先に書きます:

In article <ddb5u6$fmn$1 xx digitaldaemon.com>, Stefan says...
記事<ddb5u6$fmn$1 xx digitaldaemon.com>では、ステファンは言います...
>
>
>> ... However, when you
>> ...しかしながら、いつ、あなた
>> open the test.log file, the content of it is,
>>、test.logファイルを開く、その内容はそうです、
>>
>>
>>ao??t
>>ao、t
>
>
> ... A lot of editors (e.g. Notepad)
>...多くのエディター(例えばノートパッド)
>need a 'magic' byte order mark (BOM) in the beginning of the file to be able to
>有能なファイルの最初に「マジック」バイトオーダー・マーク(BOM)を必要とする。
>recognize an UTF8 file. For example, the (Notepad) BOM for UTF8 is
>UTF8ファイルを認識します。例えば、UTF8のための(ノートパッド)BOMはそうです。
>ef bb bf. Delete these with an hex editor and it'll give you the same
>F bbボールドフェース 魔力エディターとこれらを削除してください。そうすれば、それはあなたに同じ物を与えるでしょう。
>output.
>出力。

Just realized that Notepad on XP works even without the BOM now.
今、BOMなしでさえXP工場上のそのノートパッドをちょうど実現しました。
You can reproduce it with WordPad, however. Any decent XML editor
しかしながら、WordPadでそれを再生することができます。任意の適正なXMLエディター
should be able to display correctly without BOMs.
BOMなしで正確に表示することができるに違いありません。

Best regards,
敬具、
Stefan
ステファン



Tue, 9 Aug 2005 22:03:53 +0000 (UTC) jicman <jicman_member xx pathlink.com> writes:
2005年8月9日(火)の22:03:53+0000(UTC)jicman<jicman_member xx pathlink.com>は以下の宛て先に書きます:

Stefan says...
ステファンは言います...
>
>
>In article <ddb5u6$fmn$1 xx digitaldaemon.com>, Stefan says...
>記事<ddb5u6$fmn$1 xx digitaldaemon.com>では、ステファンは言います...
>>
>>
>>> ... However, when you
>>...しかしながら、いつ、あなた
>>> open the test.log file, the content of it is,
>>test.logファイルを開く、その内容はそうです、
>>>
>>
>>>ao??t
>>ao、t
>>
>>
>> ... A lot of editors (e.g. Notepad)
>> ...多くのエディター(例えばノートパッド)
>>need a 'magic' byte order mark (BOM) in the beginning of the file to be able to
>>有能なファイルの最初に「マジック」バイトオーダー・マーク(BOM)を必要とする。
>>recognize an UTF8 file. For example, the (Notepad) BOM for UTF8 is
>>UTF8ファイルを認識します。例えば、UTF8のための(ノートパッド)BOMはそうです。
>>ef bb bf. Delete these with an hex editor and it'll give you the same
>>F bbボールドフェース 魔力エディターとこれらを削除してください。そうすれば、それはあなたに同じ物を与えるでしょう。
>>output.
>>出力。
>
>
>Just realized that Notepad on XP works even without the BOM now.
>今、BOMなしでさえXP工場上のそのノートパッドをちょうど実現しました。
>You can reproduce it with WordPad, however. Any decent XML editor
>しかしながら、WordPadでそれを再生することができます。任意の適正なXMLエディター
>should be able to display correctly without BOMs.
>BOMなしで正確に表示することができるに違いないこと
>
>
>Best regards,
>敬具、
>Stefan
>ステファン

Thanks for the help, Stefan. The problem is much deeper than that. I get input
支援(ステファン)をありがとう。その問題はそれよりはるかに深い。私は入力を得ます。
string from a file which contains certain words, say "ao?t" which I need to test
ある言葉を含んでいるファイルから一続きになり、私がテストする必要のある「ao?t」を言います。
on. The problem is that even though I have a test on the program, which
の上で。たとえIがプログラムの上にテストを行っていても、その問題はそれです、どれ
displays correctly, the test never matches because the input data, "ao?t", and
ディスプレイ、正確に、テストは一致しません、ので、入力データ、「ao?t」、そして
the test data inside the program, "ao?t", never match.
プログラム「ao?t」の内部のテスト・データは一致しません。

I guess I still don't understand UTF. :-o
私は、まだUTFを理解しないと推測します。:-o

I will have to rewrite this whole check check function because of this.
私は、このためにこの全体のチェック・チェック機能を書き直さなければならないでしょう。

Thanks for the help.
支援をありがとう。

jos?Ebr>
jos?Ebr>



Tue, 9 Aug 2005 22:22:46 +0000 (UTC) Stefan Zobel <Stefan_member xx pathlink.com> writes:
火曜日に、2005年8月9日の22:22:46+0000(UTC)ステファンツォーベル<ステファン_メンバーxx pathlink.com>は書きます:

In article <ddb989$jkm$1 xx digitaldaemon.com>, jicman says...
1ドルの記事<ddb989$jkm xx digitaldaemon.com>では、jicmanは言います…

>

>Thanks for the help, Stefan.
ステファン、>は助けについて感謝します。
The problem is much deeper than that.
問題はそれよりはるかに深いです。
I get input
私は入力されます。

>string from a file which contains certain words, say "ao?" which I need to test
テストする私が、必要がある"ao?"は、>がファイルからある単語を含むものを結ぶと言います。

>on.
>、オンです。
The problem is that even though I have a test on the program, which
私はプログラムのときにテストがありますが、問題がそれである、どれ

>displays correctly, the test never matches because the input data, "ao?", and
そして>が正しく表示して、テストが決して合わない、入力データ、"ao?"。

>the test data inside the program, "ao?", never match.
プログラムの中のテストデータ"ao?"が決して合わない>。


Are you sure you're reading/interpreting the file as UTF8 (and it actually is
あなたがUTF8としてファイルを読むか、または解釈しているのを確信している、(それは実際にそうです。

UTF8 encoded)?
コード化されたUTF8)
Nevertheless, good luck!
それにもかかわらず、幸運!
If there's something to learn from
学ぶ何かがあれば

your investigations let us other D newbies know ;-)
あなたの調査が私たちをさせる、新入りが知っているもう一方D(^_-)


Best regards,
敬具

Stefan
ステファン



>I guess I still don't understand UTF.
>Iは、私がまだUTFを理解していないと推測します。
:-o

>

>I will have to rewrite this whole check check function because of this.
私がこれのためにこの全体のチェックチェック機能を書き直すために持つつもりである>。

>

>Thanks for the help.
>は助けについて感謝します。

>

>jos・br>



Wed, 10 Aug 2005 02:57:12 +0000 (UTC) jicman <jicman_member xx pathlink.com> writes:
水曜日に、2005年8月10日の02:57:12+0000(UTC)jicman<jicman_メンバーxx pathlink.com>は書きます:


Stefan Zobel says...
ステファン・ツォーベルは言います…

>

>In article <ddb989$jkm$1 xx digitaldaemon.com>, jicman says...
1ドルの記事<ddb989$jkm xx digitaldaemon.com>の>、jicmanは言います…

>>

>>Thanks for the help, Stefan.
ステファン、>>は助けについて感謝します。
The problem is much deeper than that.
問題はそれよりはるかに深いです。
I get input
私は入力されます。

>>string from a file which contains certain words, say "ao?" which I need to test
>が、ある単語を含むファイルから結ぶ>、テストする私が、必要がある"ao?"を言ってください。

>>on.
>>、オンです。
The problem is that even though I have a test on the program, which
私はプログラムのときにテストがありますが、問題がそれである、どれ

>>displays correctly, the test never matches because the input data, "ao?", and
そして>>が正しく表示して、テストが決して合わない、入力データ、"ao?"。

>>the test data inside the program, "ao?", never match.
プログラムの中のテストデータ"ao?"が決して合わない>>。

>

>Are you sure you're reading/interpreting the file as UTF8 (and it actually is
>によるあなた方確信しているあなたがUTF8としてファイルを読むか、または解釈しているということである、(それは実際にそうです。

>UTF8 encoded)?
UTF8がコード化した>)


Well, here is a question:
さて、ここに、質問があります:
do I have to change the data that I work with?
私は働いているデータを変えなければなりませんか?
For

example, I have this 200+ files with text data which contain ASCII data with
例、Iには、ASCIIデータを含むテキストデータがあるこの200個の+ファイルがあります。

many different accented characters.
多くの異なったアクセントをつけられたキャラクタ。
Do I need to change this input data to UTF8
私は、この入力データをUTF8に変える必要があります。

to be able to work with it?
それで扱うことができるように?
I know that I have to save the source code files as
私は、そのIがソースコードファイルを保存しなければならないのを知っています。

UTF8, but do I also have to change the other text files that I work with to
UTF8、また、私は働いている他のテキストファイルを変えなければなりません。

UTF8?
That is my problem.
それは私の問題です。
I am saving the source files ok, but the input that
私はしかし、ソースファイルOK、入力にそれを救っています。

I read from text files are not matching the the source code.
テキストファイルから合っていない、私が、読むソースコード。
Again, do I need
もう一度、Iの必要性をしてください。

to change that input data to UTF8?
データをUTF8に入力した変化に?



> Nevertheless, good luck!
>、それにもかかわらず、幸運!
If there's something to learn from
学ぶ何かがあれば

>your investigations let us other D newbies know ;-)
>、あなたの調査が私たちをさせる、新入りが知っているもう一方D(^_-)


There is nothing to learn.
何も学ぶことがありません。
;-)
All I am going to do is to change any character
私がするつもりであるすべてはどんなキャラクタも変えることです。

higher than 127 to +. :-)
127より+に高いです。
That's how I have been able to work with this UTF
それは私がこのUTFと共にどう働くことができたかということです。

stuff.
詰めます。
:-)


thanks,
ありがとうございます。


jos・br>



Wed, 10 Aug 2005 13:14:54 +1000 Derek Parnell <derek xx psych.ward> writes:
水曜日、2005年8月10日の13:14: 54+1000デリックパーネル<derek xx psych.ward>は書きます:

On Wed, 10 Aug 2005 02:57:12 +0000 (UTC), jicman wrote:
水曜日、2005年8月10日の02:57:12+0000(UTC)に、jicmanは書きました:


> Stefan Zobel says...
>ステファン・ツォーベルは言います…

>>

>>In article <ddb989$jkm$1 xx digitaldaemon.com>, jicman says...
1ドルの記事<ddb989$jkm xx digitaldaemon.com>の>>、jicmanは言います…

>>>

>>>Thanks for the help, Stefan.
ステファン、>>>は助けについて感謝します。
The problem is much deeper than that.
問題はそれよりはるかに深いです。
I get input
私は入力されます。

>>>string from a file which contains certain words, say "ao?" which I need to test
>が、ある単語を含むファイルから結ぶ>>、テストする私が、必要がある"ao?"を言ってください。

>>>on.
>>>、オンです。
The problem is that even though I have a test on the program, which
私はプログラムのときにテストがありますが、問題がそれである、どれ

>>>displays correctly, the test never matches because the input data, "ao?", and
そして>>>が正しく表示して、テストが決して合わない、入力データ、"ao?"。

>>>the test data inside the program, "ao?", never match.
プログラムの中のテストデータ"ao?"が決して合わない>>>。

>>

>>Are you sure you're reading/interpreting the file as UTF8 (and it actually is
>>によるあなた方確信しているあなたがUTF8としてファイルを読むか、または解釈しているということである、(それは実際にそうです。

>>UTF8 encoded)?
UTF8がコード化した>>)

>

> Well, here is a question:
健康な人と、ここの>は質問です:
do I have to change the data that I work with?
私は働いているデータを変えなければなりませんか?
For

> example, I have this 200+ files with text data which contain ASCII data with
>の例、Iには、ASCIIデータを含むテキストデータがあるこの200個の+ファイルがあります。

> many different accented characters.
>多くの異なったアクセントをつけられたキャラクタ。
Do I need to change this input data to UTF8
私は、この入力データをUTF8に変える必要があります。

> to be able to work with it?
それで働くことができる>?
I know that I have to save the source code files as
私は、そのIがソースコードファイルを保存しなければならないのを知っています。

> UTF8, but do I also have to change the other text files that I work with to
>UTF8、また、私は働いている他のテキストファイルを変えなければなりません。

> UTF8?
That is my problem.
それは私の問題です。
I am saving the source files ok, but the input that
私はしかし、ソースファイルOK、入力にそれを救っています。

> I read from text files are not matching the the source code.
テキストファイルから合っていない、>Iが、読んだソースコード。
Again, do I need
もう一度、Iの必要性をしてください。

> to change that input data to UTF8?
その入力データをUTF8に変える>?


Technically, if it contains accented characters it is *not* ASCII.
アクセントをつけられたキャラクタを含んでいるなら、それは*ではなく、技術的に、*です。ASCII。
It is
それはそうです。

some other form of character encoding.
ある他のフォームのキャラクタコード化。
For example, my Windows XP has Code
例えば、私のWindows XPには、Codeがあります。

Page 850 set for the DOS console.
850ページはDOSコンソールのためにセットしました。


( http://en.wikipedia.org/wiki/Code_page_850 )


You would need to find out which character encoding standard was used in
あなたは、規格をコード化するキャラクタがどれで使用されたかを見つける必要があるでしょう。

your file, then read the file in as a stream of *bytes* not chars, and
そしてあなたのファイルであり、*バイト*の流れが焦げないのでファイルがその時中で読んだ。

convert each of the byte values into the equivalent Unicode character.
それぞれのバイト値を同等なユニコードキャラクタに変換してください。
You
あなた

could then use UTF8 "char[]", UTF16 "wchar[]", or UTF32 "dchar[]" as your
次に、UTF8「炭[]」、UTF16"wchar[]"、またはUTF32"dchar[]"を使用することができた、あなた

preferred coding in your program.
あなたのプログラムにおける都合のよいコード化。


Also have a look at
また、見ます。


http://www.prowiki.org/wiki4d/wiki.cgi?UnicodeIssues


for further help.
さらなる助けのために。

--

Derek
デリック

(skype: derek.j.parnell)

Melbourne, Australia
メルボルン(オーストラリア)

10/08/2005 1:03:43 PM
10/08/2005の午後1時3分43秒


Wed, 10 Aug 2005 16:02:57 +1200 "Regan Heath" <regan xx netwin.co.nz> writes:
水曜日に、2005年8月10日の16:02:57+1200 「リーガンHeath」<regan xx netwin.co.nz>は書きます:

------------
ZVb7U8x7kmqd0N1gRinYIz

Content-Type:
コンテントタイプ:
text/plain;
テキスト/平野;
format=flowed;
形式=は流れました;
delsp=yes;
delsp=はい;
charset=iso-8859-15

Content-Transfer-Encoding:
満足している転送コード化:
8bit
8ビット


On Wed, 10 Aug 2005 02:57:12 +0000 (UTC), jicman
水曜日、2005年8月10日の02:57:12+0000(UTC)、jicmanに関して

<jicman_member xx pathlink.com> wrote:
<jicman_メンバーxx pathlink.com>は書きました:

> Stefan Zobel says...
>ステファン・ツォーベルは言います…

>>

>> In article <ddb989$jkm$1 xx digitaldaemon.com>, jicman says...
1ドルの記事<ddb989$jkm xx digitaldaemon.com>の>>、jicmanは言います…

>>>

>>> Thanks for the help, Stefan.
ステファン、>>>は助けについて感謝します。
The problem is much deeper than that.
問題はそれよりはるかに深いです。
I

>>> get input
>>>は入力されます。

>>> string from a file which contains certain words, say "ao?t" which I
>>>はたとえば、ある単語を含むファイル、「ao?t」からどのIを結ぶか。

>>> need to test
テストする>>>の必要性

>>> on.
>>>、オンです。
The problem is that even though I have a test on the program,
私はプログラムのときにテストがありますが、問題はそれです。

>>> which
>>>、どれ

>>> displays correctly, the test never matches because the input data,
>>>が正しく表示して、テストが決して合わない、入力データ

>>> "ao?t", and
そして>>>「ao t?」。

>>> the test data inside the program, "ao?t", never match.
「ao?t」というプログラムの中のテストデータが決して合わない>>>。

>>

>> Are you sure you're reading/interpreting the file as UTF8 (and it
>>によるあなた方確信しているあなたがUTF8としてファイルを読むか、または解釈しているということである、(それ

>> actually is
>>は実際にそうです。

>> UTF8 encoded)?
UTF8がコード化した>>)

>

> Well, here is a question:
健康な人と、ここの>は質問です:
do I have to change the data that I work
私は扱うデータを変えなければなりません。

> with?
>
For example, I have this 200+ files with text data which contain
例えば、私にはテキストデータがあるこの200個の+ファイルがある、どれ、含有

> ASCII data with many different accented characters.
多くが異なっている>ASCIIデータはキャラクタにアクセントをつけました。
Do I need to change
私は、変化する必要があります。

> this input data to UTF8 to be able to work with it?
>、それで働くことができるUTF8へのこの入力データ?


Yes and No.
はい、そして、いいえ


As Derek said, if it has characters above 127 it's not ascii, see:
デリックが言ったように、127を超えて品位があるなら、それはASCIIでなく、見てください:

http://www.columbia.edu/kermit/csettables.html


I suspect your data is "Microsoft Windows Code Page 1252" or "ISO 8859-1
私は、あなたのデータが「マイクロソフトWindowsコードページ1252」か「ISO8859-1」であると疑います。

Latin Alphabet 1" which are very similar.
非常に同様のローマ字1インチ。


To figure it out open the text file in a binary editor and check the value
それを見積もるために、2進のエディタでテキストファイルを開いてください、そして、値をチェックしてください。

of an accented character and compare it to the tables in the links above.
上のリンクでテーブルとキャラクタにアクセントをつけて、それを比較します。


You can read and write these non UTF characters into a char[] etc,
あなたは炭[]などにこれらの非UTFキャラクタを読み書きすることができます。

provided you don't use writef or any other routine that actually checks
あなたが実際にチェックするwritefか他のルーチンを使用しないなら

whether the characters are valid UTF, i.e. writeString works but writef
キャラクタは有効なUTF、すなわち、writeString作品であるか、しかし、writef

will give an exception.
例外を与えるでしょう。


If you want to compare the data to static string you'll need to convert
データを静的なストリングにたとえたいなら、あなたは、変換する必要があるでしょう。

the data to UTF.
UTFへのデータ。
I have a small module which will convert windows code
私には、窓のコードを変換する小さいモジュールがあります。

page 1252 into UTF8, 16, and 32 and back again (tho the back again is
行き帰りUTF8、16、および32へ1252を呼び出してください、(thoに、後部は再びそうです。

totally untested).
完全に試されていない、)
I needed it for much the same thing as you do.
私はあなたが必要であったように似たり寄ったりのものにそれを必要としました。
This
これ

code is public domain.
コードは公共の場です。


Regan
リーガン

------------
ZVb7U8x7kmqd0N1gRinYIz

Content-Disposition:
満足している気質:
attachment;
付属;
filename=cp1252.d
ファイル名=cp1252.d

Content-Type:
コンテントタイプ:
application/octet-stream;
八重奏アプリケーション/流れ;
name=cp1252.d
名前=cp1252.d

Content-Transfer-Encoding:
満足している転送コード化:
8bit
8ビット


module cp1252;
モジュールcp1252;

import std.utf;
std.utfを輸入してください;


char[] cp1252toUTF8
炭[]cp1252toUTF8
(ubyte[] raw)
(ubyte[]、生で)

{

return toUTF8(cp1252toUTF16(raw));
toUTF8(cp1252toUTF16(生の))を返してください;

}


wchar[] cp1252toUTF16
(ubyte[] raw)
(ubyte[]、生で)

{

wchar[] result;
wchar[]結果;


result.length = raw.length;

foreach
(int i, ubyte b; raw)
(int i、ubyte b; 生で)

{

if (b <= 0x80) result[i] = b;
(b<=0×80)結果[i]=bであるなら;

else result[i] = table[b];
ほかの結果[i]=テーブル[b];

}


return result;
結果を返してください;

}


dchar[] cp1252toUTF32
(ubyte[] raw)
(ubyte[]、生で)

{

return toUTF32(cp1252toUTF16(raw));
toUTF32(cp1252toUTF16(生の))を返してください;

}


ushort[] table = [
ushort[]テーブル=、[

0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
0×0000 0×0001 0×0002 0×0003 0×0004 0×0005 0×0006 0×0007 0×0008 0×0009 0x000A、0x000B、0x000C、0x000D、0x000E、0x000F

0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
0×0010 0×0011 0×0012 0×0013 0×0014 0×0015 0×0016 0×0017 0×0018 0×0019 0x001A、0x001B、0x001C、0x001D、0x001E、0x001F

0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
0×0020 0×0021 0×0022 0×0023 0×0024 0×0025 0×0026 0×0027 0×0028 0×0029 0x002A、0x002B、0x002C、0x002D、0x002E、0x002F

0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
0×0030 0×0031 0×0032 0×0033 0×0034 0×0035 0×0036 0×0037 0×0038 0×0039 0x003A、0x003B、0x003C、0x003D、0x003E、0x003F

0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
0×0040 0×0041 0×0042 0×0043 0×0044 0×0045 0×0046 0×0047 0×0048 0×0049 0x004A、0x004B、0x004C、0x004D、0x004E、0x004F

0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
0×0050 0×0051 0×0052 0×0053 0×0054 0×0055 0×0056 0×0057 0×0058 0×0059 0x005A、0x005B、0x005C、0x005D、0x005E、0x005F

0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
0×0060 0×0061 0×0062 0×0063 0×0064 0×0065 0×0066 0×0067 0×0068 0×0069 0x006A、0x006B、0x006C、0x006D、0x006E、0x006F

0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
0×0070 0×0071 0×0072 0×0073 0×0074 0×0075 0×0076 0×0077 0×0078 0×0079 0x007A、0x007B、0x007C、0x007D、0x007E、0x007F

0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x017D, 0x0000,
0x20AC、0×0000、0x201A、0×0192、0x201E、0×2026、0×2020、0×2021、0x02C6、0×2030、0×0160、0×2039、0×0152、0×0000、0x017D、0×0000

0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x0000, 0x017E, 0x0178,
0×0000 0×2018 0×2019 0x201C、0x201D、0×2022、0×2013、0×2014、0x02DC、0×2122、0×0161、0x203A、0×0153、0×0000、0x017E、0×0178

0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,

0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,

0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,

0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,

0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,

0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF

];


/* UNTESTED!
/*試されていない!
*
/

ubyte[] UTF16toCP1252
(char[] raw)
([] 生で焦げます)

{

return UTF16toCP1252(toUTF16(raw));
UTF16toCP1252(toUTF16(生の))を返してください;

}


ubyte[] UTF16toCP1252
(wchar[] raw)
(wchar[]、生で)

{

ubyte[] result;
ubyte[]結果;


result.length = raw.length;

foreach
(int i, wchar c; raw)
(int i、wchar c; 生で)

{

foreach
(int j, ushort s; table)
(int j、ushort s;、テーブル)

{

if
(c == s)

{

result[i] = table[j];
結果[i]=テーブル[j];

goto found;
見つけられたgoto;

}

}

throw new Exception("Data cannot be encoded");
新しいException(「データをコード化することができない」)を投げてください;

found:
設立します:

;

}


return result;
結果を返してください;

}


ubyte[] UTF16toCP1252
(dchar[] raw)
(dchar[]、生で)

{

return UTF16toCP1252(toUTF16(raw));
UTF16toCP1252(toUTF16(生の))を返してください;

}


------------
ZVb7U8x7kmqd0N1gRinYIz--


Thu, 11 Aug 2005 01:38:58 +0000 (UTC) jicman <jicman_member xx pathlink.com> writes:


WOW! I thought everything was over about the subject, and then, I hit the
newsgroup again and BOOM, all of these nice responses. :-) Thanks folks.

jic

Regan Heath says...
>
>------------ZVb7U8x7kmqd0N1gRinYIz
>Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15
>Content-Transfer-Encoding: 8bit
>
>On Wed, 10 Aug 2005 02:57:12 +0000 (UTC), jicman
><jicman_member xx pathlink.com> wrote:
>> Stefan Zobel says...
>>>
>>> In article <ddb989$jkm$1 xx digitaldaemon.com>, jicman says...
>>>>
>>>> Thanks for the help, Stefan. The problem is much deeper than that. I
>>>> get input
>>>> string from a file which contains certain words, say "aot" which I
>>>> need to test
>>>> on. The problem is that even though I have a test on the program,
>>>> which
>>>> displays correctly, the test never matches because the input data,
>>>> "aot", and
>>>> the test data inside the program, "aot", never match.
>>>
>>> Are you sure you're reading/interpreting the file as UTF8 (and it
>>> actually is
>>> UTF8 encoded)?
>>
>> Well, here is a question: do I have to change the data that I work
>> with? For example, I have this 200+ files with text data which contain
>> ASCII data with many different accented characters. Do I need to change
>> this input data to UTF8 to be able to work with it?
>
>Yes and No.
>
>As Derek said, if it has characters above 127 it's not ascii, see:
> http://www.columbia.edu/kermit/csettables.html
>
>I suspect your data is "Microsoft Windows Code Page 1252" or "ISO 8859-1
>Latin Alphabet 1" which are very similar.
>
>To figure it out open the text file in a binary editor and check the value
>of an accented character and compare it to the tables in the links above.
>
>You can read and write these non UTF characters into a char[] etc,
>provided you don't use writef or any other routine that actually checks
>whether the characters are valid UTF, i.e. writeString works but writef
>will give an exception.
>
>If you want to compare the data to static string you'll need to convert
>the data to UTF. I have a small module which will convert windows code
>page 1252 into UTF8, 16, and 32 and back again (tho the back again is
>totally untested). I needed it for much the same thing as you do. This
>code is public domain.
>
>Regan
>------------ZVb7U8x7kmqd0N1gRinYIz
>Content-Disposition: attachment; filename=cp1252.d
>Content-Type: application/octet-stream; name=cp1252.d
>Content-Transfer-Encoding: 8bit
>
>module cp1252;
>import std.utf;
>
>char[] cp1252toUTF8(ubyte[] raw)
>{
> return toUTF8(cp1252toUTF16(raw));
>}
>
>wchar[] cp1252toUTF16(ubyte[] raw)
>{
> wchar[] result;
>
> result.length = raw.length;
> foreach(int i, ubyte b; raw)
> {
> if (b <= 0x80) result[i] = b;
> else result[i] = table[b];
> }
>
> return result;
>}
>
>dchar[] cp1252toUTF32(ubyte[] raw)
>{
> return toUTF32(cp1252toUTF16(raw));
>}
>
>ushort[] table = [
> 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
> 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
> 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
> 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
> 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
> 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
> 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
> 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
> 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x017D, 0x0000,
> 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x0000, 0x017E, 0x0178,
> 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
> 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
> 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
> 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
> 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
> 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF
>];
>
>/* UNTESTED! */
>ubyte[] UTF16toCP1252(char[] raw)
>{
> return UTF16toCP1252(toUTF16(raw));
>}
>
>ubyte[] UTF16toCP1252(wchar[] raw)
>{
> ubyte[] result;
>
> result.length = raw.length;
> foreach(int i, wchar c; raw)
> {
> foreach(int j, ushort s; table)
> {
> if (c == s)
> {
> result[i] = table[j];
> goto found;
> }
> }
> throw new Exception("Data cannot be encoded");
> found:
> ;
> }
>
> return result;
>}
>
>ubyte[] UTF16toCP1252(dchar[] raw)
>{
> return UTF16toCP1252(toUTF16(raw));
>}
>
>------------ZVb7U8x7kmqd0N1gRinYIz--



Thu, 11 Aug 2005 01:38:58 +0000 (UTC) jicman <jicman_member xx pathlink.com> writes:
木曜日に、2005年8月11日の01:38:58+0000(UTC)jicman<jicman_メンバーxx pathlink.com>は書きます:


WOW!
ワオ!
I thought everything was over about the subject, and then, I hit the
私は、すべてが対象に関するものであると思いました、そして、次に、当たりました。

newsgroup again and BOOM, all of these nice responses.
そして、ニュースグループ、再び、BOOM、これらの楽しい応答のすべて。
:-)
Thanks folks.
感謝人々。


jic


Regan Heath says...
リーガンHeathは言います…

>

>
------------
ZVb7U8x7kmqd0N1gRinYIz

>Content-Type:
>コンテントタイプ:
text/plain;
テキスト/平野;
format=flowed;
形式=は流れました;
delsp=yes;
delsp=はい;
charset=iso-8859-15

>Content-Transfer-Encoding:
>の満足している転送コード化:
8bit
8ビット

>

>On Wed, 10 Aug 2005 02:57:12 +0000 (UTC), jicman
水曜日の>、2005年8月10日の02:57:12+0000(UTC)、jicman

><jicman_member xx pathlink.com> wrote:
><jicman_メンバーxx pathlink.com>は書きました:

>> Stefan Zobel says...
>>ステファン・ツォーベルは言います…

>>>

>>> In article <ddb989$jkm$1 xx digitaldaemon.com>, jicman says...
1ドルの記事<ddb989$jkm xx digitaldaemon.com>の>>>、jicmanは言います…

>>>>

>>>> Thanks for the help, Stefan.
ステファン、>>>>は助けについて感謝します。
The problem is much deeper than that.
問題はそれよりはるかに深いです。
I

>>>> get input
>>>>は入力されます。

>>>> string from a file which contains certain words, say "ao?" which I
>>>>はたとえば、ある単語を含むファイル、"ao?"からどのIを結ぶか。

>>>> need to test
テストする>>>>の必要性

>>>> on.
>>>>、オンです。
The problem is that even though I have a test on the program,
私はプログラムのときにテストがありますが、問題はそれです。

>>>> which
>>>>、どれ

>>>> displays correctly, the test never matches because the input data,
>>>>が正しく表示して、テストが決して合わない、入力データ

>>>> "ao?", and
そして>>>>"ao?"。

>>>> the test data inside the program, "ao?", never match.
プログラムの中のテストデータ"ao?"が決して合わない>>>>。

>>>

>>> Are you sure you're reading/interpreting the file as UTF8 (and it
>>>によるあなた方確信しているあなたがUTF8としてファイルを読むか、または解釈しているということである、(それ

>>> actually is
>>>は実際にそうです。

>>> UTF8 encoded)?
UTF8がコード化した>>>)

>>

>> Well, here is a question:
健康な人と、ここの>>は質問です:
do I have to change the data that I work
私は扱うデータを変えなければなりません。

>> with?
>>
For example, I have this 200+ files with text data which contain
例えば、私にはテキストデータがあるこの200個の+ファイルがある、どれ、含有

>> ASCII data with many different accented characters.
多くが異なっている>>ASCIIデータはキャラクタにアクセントをつけました。
Do I need to change
私は、変化する必要があります。

>> this input data to UTF8 to be able to work with it?
これがそれで扱うためにデータをできるUTF8に入力した>>

>

>Yes and No.
>はいとNo.

>

>As Derek said, if it has characters above 127 it's not ascii, see:
デリックとしての>が言われていて、127を超えて品位があるなら、それはASCIIでなく、見てください:

> http://www.columbia.edu/kermit/csettables.html

>

>I suspect your data is "Microsoft Windows Code Page 1252" or "ISO 8859-1
>Iは、あなたのデータが「マイクロソフトWindowsコードページ1252」か「ISO8859-1」であると疑います。

>Latin Alphabet 1" which are very similar.
>、非常に同様のローマ字1インチ。

>

>To figure it out open the text file in a binary editor and check the value
それを見積もる>は2進のエディタでテキストファイルを開いて、値をチェックします。

>of an accented character and compare it to the tables in the links above.
>、上のリンクでテーブルとキャラクタにアクセントをつけて、それを比較します。

>

>You can read and write these non UTF characters into a char[] etc,
あなたが炭[]などへのこれらの非UTFキャラクタに読み込んで、書くことができる>

>provided you don't use writef or any other routine that actually checks
>の提供されたあなたは実際にチェックするwritefかいかなる他のルーチンも使用しません。

>whether the characters are valid UTF, i.e. writeString works but writef
>はキャラクタが有効なUTF、しかし、すなわち、writeStringが働いているということであるか否かに関係なく、writefされます。

>will give an exception.
>は例外を与えるでしょう。

>

>If you want to compare the data to static string you'll need to convert
あなたがあなたがそうする静的なストリングへのデータを比較したいなら、>は転向者にそうしなければなりません。

>the data to UTF.
>、UTFへのデータ。
I have a small module which will convert windows code
私には、窓のコードを変換する小さいモジュールがあります。

>page 1252 into UTF8, 16, and 32 and back again (tho the back again is
>が行き帰りUTF8、16、および32へ1252を呼び出す、(thoに、後部は再びそうです。

>totally untested).
>、完全に試されていない、)
I needed it for much the same thing as you do.
私はあなたが必要であったように似たり寄ったりのものにそれを必要としました。
This
これ

>code is public domain.
>コードは公共の場です。

>

>Regan
>リーガン

>
------------
ZVb7U8x7kmqd0N1gRinYIz

>Content-Disposition:
>の満足している気質:
attachment;
付属;
filename=cp1252.d
ファイル名=cp1252.d

>Content-Type:
>コンテントタイプ:
application/octet-stream;
八重奏アプリケーション/流れ;
name=cp1252.d
名前=cp1252.d

>Content-Transfer-Encoding:
>の満足している転送コード化:
8bit
8ビット

>

>module cp1252;
>モジュールcp1252;

>import std.utf;
>輸入std.utf;

>

>char[] cp1252toUTF8
>炭[]cp1252toUTF8
(ubyte[] raw)
(ubyte[]、生で)

>{

> return toUTF8(cp1252toUTF16(raw));
>リターンtoUTF8(cp1252toUTF16(生の));

>}

>

>wchar[] cp1252toUTF16
(ubyte[] raw)
(ubyte[]、生で)

>{

> wchar[] result;
>wchar[]結果;

>

> result.length = raw.length;

> foreach
(int i, ubyte b; raw)
(int i、ubyte b; 生で)

> {

> if (b <= 0x80) result[i] = b;
>、(b<=0×80)結果[i]=bであるなら;

> else result[i] = table[b];
>ほかの結果[i]=テーブル[b];

> }

>

> return result;
>リターン結果;

>}

>

>dchar[] cp1252toUTF32
(ubyte[] raw)
(ubyte[]、生で)

>{

> return toUTF32(cp1252toUTF16(raw));
>リターンtoUTF32(cp1252toUTF16(生の));

>}

>

>ushort[] table = [
>ushort[]テーブル=、[

> 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F,
>0×0000、0×0001、0×0002、0×0003、0×0004、0×0005、0×0006、0×0007、0×0008、0×0009、0x000A、0x000B、0x000C、0x000D、0x000E、0x000F

> 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F,
>0×0010、0×0011、0×0012、0×0013、0×0014、0×0015、0×0016、0×0017、0×0018、0×0019、0x001A、0x001B、0x001C、0x001D、0x001E、0x001F

> 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
>0×0020、0×0021、0×0022、0×0023、0×0024、0×0025、0×0026、0×0027、0×0028、0×0029、0x002A、0x002B、0x002C、0x002D、0x002E、0x002F

> 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
>0×0030、0×0031、0×0032、0×0033、0×0034、0×0035、0×0036、0×0037、0×0038、0×0039、0x003A、0x003B、0x003C、0x003D、0x003E、0x003F

> 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
>0×0040、0×0041、0×0042、0×0043、0×0044、0×0045、0×0046、0×0047、0×0048、0×0049、0x004A、0x004B、0x004C、0x004D、0x004E、0x004F

> 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
>0×0050、0×0051、0×0052、0×0053、0×0054、0×0055、0×0056、0×0057、0×0058、0×0059、0x005A、0x005B、0x005C、0x005D、0x005E、0x005F

> 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
>0×0060、0×0061、0×0062、0×0063、0×0064、0×0065、0×0066、0×0067、0×0068、0×0069、0x006A、0x006B、0x006C、0x006D、0x006E、0x006F

> 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
>0×0070、0×0071、0×0072、0×0073、0×0074、0×0075、0×0076、0×0077、0×0078、0×0079、0x007A、0x007B、0x007C、0x007D、0x007E、0x007F

> 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x017D, 0x0000,
>0x20AC、0×0000、0x201A、0×0192、0x201E、0×2026、0×2020、0×2021、0x02C6、0×2030、0×0160、0×2039、0×0152、0×0000、0x017D、0×0000

> 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x0000, 0x017E, 0x0178,
>0×0000、0×2018、0×2019、0x201C、0x201D、0×2022、0×2013、0×2014、0x02DC、0×2122、0×0161、0x203A、0×0153、0×0000、0x017E、0×0178

> 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,

> 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,

> 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,

> 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, 0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,

> 0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7, 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,

> 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF

>];

>

>/* UNTESTED!
>/*試されていない!
*
/

>ubyte[] UTF16toCP1252
(char[] raw)
([] 生で焦げます)

>{

> return UTF16toCP1252(toUTF16(raw));
>リターンUTF16toCP1252(toUTF16(生の));

>}

>

>ubyte[] UTF16toCP1252
(wchar[] raw)
(wchar[]、生で)

>{

> ubyte[] result;
>ubyte[]結果;

>

> result.length = raw.length;

> foreach
(int i, wchar c; raw)
(int i、wchar c; 生で)

> {

> foreach
(int j, ushort s; table)
(int j、ushort s;、テーブル)

> {

> if
>
(c == s)

> {

> result[i] = table[j];
>結果[i]=テーブル[j];

> goto found;
見つけられた>goto;

> }

> }

> throw new Exception("Data cannot be encoded");
>一投の新しいException(「データをコード化することができません」);

> found:
>は見つけました:

> ;

> }

>

> return result;
>リターン結果;

>}

>

>ubyte[] UTF16toCP1252
(dchar[] raw)
(dchar[]、生で)

>{

> return UTF16toCP1252(toUTF16(raw));
>リターンUTF16toCP1252(toUTF16(生の));

>}

>

>
------------
ZVb7U8x7kmqd0N1gRinYIz--




Tue, 09 Aug 2005 21:51:08 -0500 Carlos Santander <csantander619 xx gmail.com> writes:
火曜日に、2005年8月9日の21:51:08 -0500カルロス・サンタンデア<csantander619 xx gmail.com>は書きます:

jicman escribi・

> Greetings!
>挨拶!

>

> Sorry about this, but I have found a wall with UTF8, again.
これが残念な>、私だけが再びUTF8と共に壁を見つけました。
Perhaps, some of
恐らくいくつか

> you may be able to help me jump it or break through it.
あなたができるかもしれない>は、私がそれを跳ぶか、またはそれを突破するのを助けます。

>

> I have this code,
これが私がコード化させる>

> char[] GetMonthDigit
>炭[]GetMonthDigit
(char[] mon)
(炭[]mon)

> {

> char [][char[]] sMon;
>は[]を炭にします。[[]] sMonを炭にしてください;

> sMon["ao?"] = "08";
>sMon["ao?"]=「8インチ」;

> return sMon[mon];
>リターンsMon[mon];

> }

>

> if I call this from within the program
>は、私であるならプログラムからこれと呼びます。

>

> char[] mon = GetMonthDigit("ao?");
>炭の[] mon=GetMonthDigit("ao?");

>

> mon will have "08", however if it comes from another text file, say an ASCII
>monには、「しかしながら、別のテキストファイルから来るなら、何8インチも、ASCIIを言ってください」があるでしょう。

> file, it fails.
>はファイルされて、それは失敗します。
So, if you take a look at this small piece of code,
したがって、この小さいコードを見てください。

>

> import std.stream;
>輸入std.stream;

> void main
>の空のメイン
()

> {

> char[] fn = "test.log";
>炭の[] fn="test.log";

> char[] txt = "ao?";
>炭の[] txt="ao?";

> File log = new File(fn,FileMode.Append);
>ファイルログ=の新しいFile(fn、FileMode.Append);

> log.writeLine(txt);

> log.close();

> }

>

> this will create a file, if it does not exists, called test.log after compile
存在していて、test.logと呼ばれて、そうしないなら、これが望んでいる>はファイルを作成して、後にコンパイルしてください。

> and run, and it will write, supposely, the content of txt.
>、走行、およびそれは書くでしょう。txtの内容を仮定して書いてください。
However, when you
しかしながら、あなたです。

> open the test.log file, the content of it is,
>はtest.log fileを開いて、それの内容があります。

>

> aoテサt

>

> Hmmmm...
I tried setting the editor settings to UTF8, and others, however,
しかしながら、私はUTF8、および他のものにエディタ設定を設定してみました。

> nothing has worked.
何も扱っていない>。
Any ideas how I can fix this?
私がどうしたらこれを修理することができるかというどんな考え?

>

> thanks,
>は感謝します。

>

> jos・br>
>

>


It must be something with the editor or with the console, because I just
それがエディタかコンソールがある何かであるに違いない、私、まさしく。

tried with gdc-0.13 on Mac and it worked ok.
Macの上にgdc-0.13があって、それがOKに扱われている状態で、試験済みです。


--

Carlos Santander Bernal
カルロス・サンタンデア・ベルナル


Wed, 10 Aug 2005 19:32:45 -0500 Carlos Santander <csantander619 xx gmail.com> writes:
水曜日に、2005年8月10日の19:32:45 -0500カルロス・サンタンデア<csantander619 xx gmail.com>は書きます:

Carlos Santander escribi・
カルロスサンタンデアescribi・

>

> It must be something with the editor or with the console, because I just
>、それがエディタかコンソールがある何かであるに違いない、私、まさしく。

> tried with gdc-0.13 on Mac and it worked ok.
Macの上にgdc-0.13があって、それがOKに扱われている状態で、>は試みました。

>


That should've been 0.15
それは0.15であるべきでした。


--

Carlos Santander Bernal
カルロス・サンタンデア・ベルナル