Type Property 型プロパティ

defaultCStringEncoding

Returns the C-string encoding assumed for any method accepting a C string as an argument. C文字列を引数として受け入れる何らかのメソッドのために仮定されるC文字列符号化を返します。

Declaration 宣言

class var defaultCStringEncoding: UInt { get }

Return Value 戻り値

The C-string encoding assumed for any method accepting a C string as an argument. C文字列を引数として受け入れる何からのメソッドに対して仮定されるC文字列符号化。

Discussion 議論

This method returns a user-dependent encoding who value is derived from user's default language and potentially other factors. You might sometimes need to use this encoding when interpreting user documents with unknown encodings, in the absence of other hints, but in general this encoding should be used rarely, if at all. Note that some potential values might result in unexpected encoding conversions of even fairly straightforward NSString content—for example, punctuation characters with a bidirectional encoding. このメソッドは、ユーザ依存の符号化を返します、それの値はユーザの省略時の言語そしてもしかすると他の因子から推論されます。あなたは時々この符号化を使う必要があるかもしれません、未知の符号化でのユーザ書類を解釈している場合に、他のヒントがないので、しかし一般にこの符号化は滅多に使われないはずです、ともかくも。可能性があるいくつかの値は、予期しない符号化変換という結果になるかもしれないことに注意してください、かなりわかりやすいNSString内容でさえも — 例えば、双方向符号化での句読点文字。

Methods that accept a C string as an argument use ...CString... in the keywords for such arguments: for example, string(withCString:)—note, though, that these are deprecated. The default C-string encoding is determined from system information and can’t be changed programmatically for an individual process. See NSStringEncoding for a full list of supported encodings. C文字列を引数として受け入れるメソッドは、...CString...をそのような引数に対するキーワードにおいて使います:例えば、string(withCString:) — 注意してください、しかしながら、それらは推奨されないことを。省略時のC文字列符号化は、システム情報から決定されます、そして個々のプロセスに対してプログラム的に変更されることができません。NSStringEncodingをサポートされる符号化の完全なリストとして見てください。

See Also 参照

Working with Encodings エンコーディングを扱う