語学学習のスペースアルク(SPACE ALC)がお届けする進化するオンライン英和・和英辞書『英辞郎 on the WEB』。大学生やビジネスパースンから翻訳家、医療・製薬業関係者の方々まで幅広くお使いいただいております。
ALC Online Shop

英辞郎データ提供元 EDP のサイトへ
検索文字列 文字コード 該当件数 : 26
* データの転載は禁じられています。  
  • 文字コード
    • character code《コ》
    • character encoding
    • switch encode
  • 文字コード体系
    character encoding scheme《コ》
  • 文字コード
    character set〔コンピューターの文字コード系、iso-8859-1uなど◆【略】char-set ; charset〕
  • "基本多言語面(BasicMultilingualPlane)"またはBMPとも呼ばれている最初のplaneには、使うであろうすべての文字が含まれているので、多くの人はUnicodeは16bit文字コードセットだと間違った想定をしてしまいがちです。
    As the first plane, aka. "Basic Multilingual Plane" or BMP, contains almost everything you will ever use, many have made the wrong assumption that Unicode was a 16-bit character set.〔【出典】Gentoo Linux 【License】CC-BY-SA-2.5 【編集】独立行政法人情報通信研究機構
  • 1文字につき4バイトを使うUnicodeエンコーディングがある。4バイト = 32ビットなので、これはUTF-32と呼ばれる。UTF-32は率直な文字コードであり、Unicode文字(4バイトの数値)を受け取って、それと同じ数値でその文字を表現する。これはいくつかの利点を持つが、一番の利点は、N番目の文字が4 × Nバイト目から始まるので、N番目の文字を定数時間で見つけられることだ。欠点もいくつかあり、最も明らかなのは、1文字につき4バイトものバイト数を必要とすることだ。
    There is a Unicode encoding that uses four bytes per character. It's called UTF-32, because 32 bits = 4 bytes. UTF-32 is a straightforward encoding; it takes each Unicode character (a 4-byte number) and represents the character with that same number. This has some advantages, the most important being that you can find the Nth character of a string in constant time, because the Nth character starts at the 4×Nth byte. It also has several disadvantages, the most obvious being that it takes four freaking bytes to store every freaking character.〔【出典】"Dive Into Python 3" by Mark Pilgrim 【和訳】Fukada & Fujimoto 【License】CC-BY-SA-3.0
  • Python 3では、すべての文字列はUnicode文字のシーケンスだ。UTF-8でエンコードされたPython文字列や、CP-1252でエンコードされたPython文字列というものは存在しない。「この文字列はUTF-8なの?」という質問は当を得ないものだ。UTF-8は文字列をバイト列としてエンコードする方法の一つなのだ。文字列を特定の文字コードでバイト列に変換したいのであれば、Python 3がそれを助けてくれる。バイト列を文字列に変換したいのであれば、それもPython 3が助けてくれる。バイトは文字ではない。バイトはただのバイトで、文字というのは抽象化であり、文字列はその抽象化のシーケンスなのだ。
    In Python 3, all strings are sequences of Unicode characters. There is no such thing as a Python string encoded in UTF-8, or a Python string encoded as CP-1252. "Is this string UTF-8?" is an invalid question. UTF-8 is a way of encoding characters as a sequence of bytes. If you want to take a string and turn it into a sequence of bytes in a particular character encoding, Python 3 can help you with that. If you want to take a sequence of bytes and turn it into a string, Python 3 can help you with that too. Bytes are not characters; bytes are bytes. Characters are an abstraction. A string is a sequence of those abstractions.〔【出典】"Dive Into Python 3" by Mark Pilgrim 【和訳】Fukada & Fujimoto 【License】CC-BY-SA-3.0
  • Pythonの組み込み例外の一つに ImportError があり、これはモジュールをインポートしようとして失敗したときに発生する。これはさまざまな理由で起き得るが、最も単純なケースは、インポートしようとしたモジュールがimport検索パスの中に見つからない場合だ。これを使えば、プログラムにオプション機能を追加できる。例えば、chardetライブラリは文字コードの自動判定を行う機能を備えている。あなたのプログラムは、このライブラリがもし存在すればこれを使いたいが、ユーザがこれをインストールしていない場合でもそのまま実行を続けたいかもしれない。このような処理は try...except ブロックを使えば実現できる。
    One of Python's built-in exceptions is ImportError, which is raised when you try to import a module and fail. This can happen for a variety of reasons, but the simplest case is when the module doesn't exist in your import search path. You can use this to include optional features in your program. For example, the chardet library provides character encoding auto-detection. Perhaps your program wants to use this library if it exists, but continue gracefully if the user hasn't installed it. You can do this with a try..except block.〔【出典】"Dive Into Python 3" by Mark Pilgrim 【和訳】Fukada & Fujimoto 【License】CC-BY-SA-3.0
  • Unicodeをできるだけ利用する計画があるなら、十分な文字コードの範囲を持ったフォントを持つことが重要です。
    For this to work, make sure you have properly created a Unicode locale as explained in Chapter1.〔【出典】Gentoo Linux 【License】CC-BY-SA-2.5 【編集】独立行政法人情報通信研究機構
  • urlopen().read()メソッドは常に文字列ではなくbytesオブジェクトを返す。思い出してほしいのだが、バイト列はバイト列であって、文字列はそれを抽象化したものだった。HTTPは抽象化されたものを扱わないので、リソースをリクエストした時には、バイト列の形で受け取ることになる。それを文字列として扱いたいなら、文字コードを定めて明示的に文字列に変換しなくてはならない。
    The urlopen().read() method always returns a bytes object, not a string. Remember, bytes are bytes; characters are an abstraction. HTTP servers don't deal in abstractions. If you request a resource, you get bytes. If you want it as a string, you'll need to determine the character encoding and explicitly convert it to a string.〔【出典】"Dive Into Python 3" by Mark Pilgrim 【和訳】Fukada & Fujimoto 【License】CC-BY-SA-3.0
  • UTF-8は、1バイトから4バイトを使用する可変長の文字コードですこれが意味するところは、ASCIIとラテン文字についてはわずかなデータ量の増加で相互変換可能だということです。
    UTF-8 UTF-8 is a variable-length character encoding, which in this instance means that it uses 1 to 4 bytes per symbol.〔【出典】Gentoo Linux 【License】CC-BY-SA-2.5 【編集】独立行政法人情報通信研究機構
  • Xemacs22.xはまだ文字コードの統合をサポートしていません。
    Xemacs 22.x does not support combining characters yet.〔【出典】Gentoo Linux 【License】CC-BY-SA-2.5 【編集】独立行政法人情報通信研究機構
  • あなたが「テキスト」について話すとき、恐らく「コンピュータスクリーン上の文字とシンボル」のことを思い浮かべるだろう。ところが、コンピュータは文字やシンボルを扱わない。コンピュータはビットやバイトを扱うのだ。今までにコンピュータスクリーンの上で見たすべてのテキストは、実際には何らかの「文字コード」で記録されている。非常に大ざっぱに言えば、文字コードというのは、あなたが画面上で見るものと、コンピュータが実際にメモリやディスクに記録するものとを対応させるものだ。多種多様な文字コードが存在しており、ロシア語・中国語・英語のような特定の言語に最適化されているものもあれば、複数の言語で使えるものもある。
    When you talk about "text," you're probably thinking of "characters and symbols on my computer screen." But computers don't deal in characters and symbols; they deal in bits and bytes. Every piece of text you've ever seen on a computer screen is actually stored in a particular character encoding. Very roughly speaking, the character encoding provides a mapping between the stuff you see on your screen and the stuff your computer actually stores in memory and on disk. There are many different character encodings, some optimized for particular languages like Russian or Chinese or English, and others that can be used for multiple languages.〔【出典】"Dive Into Python 3" by Mark Pilgrim 【和訳】Fukada & Fujimoto 【License】CC-BY-SA-3.0
  • ウェブ、メール、そして今までに作られたありとあらゆるコンピュータシステムにおける、文字化けの原因ナンバーワンは何か? それは文字コードだ。文字列の章において、文字コードの歴史と、「すべてを支配する一つの文字コード」であるUnicodeの誕生について話した。もしウェブページ上で二度と文字化けを見ずに済むのであれば、私はUnicodeを愛すのだろう。それには、すべてのオーサリングシステムが正確な文字コード情報を格納し、すべての転送プロトコルがUnicodeに対応し、テキストを扱うすべてのシステムが文字コードの変換時に完全な忠実さを持つ必要がある。
    What's the #1 cause of gibberish text on the web, in your inbox, and across every computer system ever written? It's character encoding. In the Strings chapter, I talked about the history of character encoding and the creation of Unicode, the "one encoding to rule them all." I'd love it if I never had to see a gibberish character on a web page again, because all authoring systems stored accurate encoding information, all transfer protocols were Unicode-aware, and every system that handled text maintained perfect fidelity when converting between encodings.〔【出典】"Dive Into Python 3" by Mark Pilgrim 【和訳】Fukada & Fujimoto 【License】CC-BY-SA-3.0
  • ネットワーク化されていない世界、つまり「テキスト」は自分自身で入力したものばかりで、たまにそれを印刷するような状況では、これでもおおむねうまくいっていた。「プレーンテキスト」なんてものはそれほど多くなかった。ソースコードはASCIIで書かれるし、他のみんなはワードプロセッサを使っている。ワードプロセッサは(テキスト形式ではない)独自の形式を定義しており、文字装飾などの情報と一緒に文字コードの種類も管理している。誰もが作者と同じワードプロセッサのプログラムを使って文章を読んでいたので、多かれ少なかれ、すべてがうまくいっていた。
    That was mostly OK in a non-networked world, where "text" was something you typed yourself and occasionally printed. There wasn't much "plain text". Source code was ASCII, and everyone else used word processors, which defined their own (non-text) formats that tracked character encoding information along with rich styling, &c. People read these documents with the same word processing program as the original author, so everything worked, more or less.〔【出典】"Dive Into Python 3" by Mark Pilgrim 【和訳】Fukada & Fujimoto 【License】CC-BY-SA-3.0
  • 一見したところ、これは素晴らしいアイデアのように思える。すべてを統括する一つの文字コード。一つの文書にいくつもの言語。言語エンコーディングを途中で切り替えるための「モードスイッチ」なんてもう必要ない。しかし、すぐに明らかな疑問が浮かび上がってくるだろう。4バイトだって? すべての文字で?! これはひどく無駄が多いように思えるし、英語やスペイン語のように、1バイト(256個の数値)以下ですべての文字を表現できるような言語に対しては特にそう感じられる。実をいうと(中国語のような)表意文字の言語でさえも2バイトしか必要としないので、これらの言語であっても無駄が多いのだ。
    On the face of it, this seems like a great idea. One encoding to rule them all. Multiple languages per document. No more "mode switching" to switch between encodings mid-stream. But right away, the obvious question should leap out at you. Four bytes? For every single character? That seems awfully wasteful, especially for languages like English and Spanish, which need less than one byte (256 numbers) to express every possible character. In fact, it's wasteful even for ideograph-based languages (like Chinese), which never need more than two bytes per character.〔【出典】"Dive Into Python 3" by Mark Pilgrim 【和訳】Fukada & Fujimoto 【License】CC-BY-SA-3.0
  • 世界の主要な言語には、個別の文字コードが存在している。言語はそれぞれが異なるものであるし、歴史的にはメモリもディスクも高価なものだったので、個々の文字コードは特定の一つの言語のために最適化されている。要するに、私が言いたいのは、各々のエンコーディングは同じ数字 (0-255) を使ってその言語の文字を表現しているということだ。例えば、恐らく皆さんが慣れ親しんでいるであろうASCIIコードは英語の文字を0から127までの範囲の数字で格納している(65は大文字の"A"、97は小文字の"a"など)。英語は非常に単純なアルファベットを持っているので、128個以下の数字で完全に表現できる。2進数で数を数えられるあなたのために言っておくと、128というのは1バイトを構成する8ビットのうちの7ビットだ。
    There are character encodings for each major language in the world. Since each language is different, and memory and disk space have historically been expensive, each character encoding is optimized for a particular language. By that, I mean each encoding using the same numbers (0-255) to represent that language's characters. For instance, you're probably familiar with the ASCII encoding, which stores English characters as numbers ranging from 0 to 127. (65 is capital "A", 97 is lowercase "a", &c.) English has a very simple alphabet, so it can be completely expressed in less than 128 numbers. For those of you who can count in base 2, that's 7 out of the 8 bits in a byte.〔【出典】"Dive Into Python 3" by Mark Pilgrim 【和訳】Fukada & Fujimoto 【License】CC-BY-SA-3.0
  • 中国語・日本語・韓国語のような言語は大量の文字を持っているので、マルチバイトの文字集合が必要になる。要するに、各々の「文字」が0から65535までの2バイトの数で表現されるのだ。しかし、マルチバイトの文字コードは、依然としてシングルバイトの文字コードと同じ問題を抱えている。すなわち、同じ数値であっても文字コードごとに表現している文字が異なるという問題だ。マルチバイトの文字コードは、表現する文字が多いために数値の範囲を広げたというだけにすぎない。
    Then there are languages like Chinese, Japanese, and Korean, which have so many characters that they require multiple-byte character sets. That is, each "character" is represented by a two-byte number from 0-65535. But different multi-byte encodings still share the same problem as different single-byte encodings, namely that they each use the same numbers to mean different things. It's just that the range of numbers is broader, because there are many more characters to represent.〔【出典】"Dive Into Python 3" by Mark Pilgrim 【和訳】Fukada & Fujimoto 【License】CC-BY-SA-3.0
  • 今度は、Webや電子メールのような世界規模のネットワークの出現について考えてみよう。大量の「プレーンテキスト」が地球上を飛び回っており、1台目のコンピュータ上で書かれたテキストが、2台目のコンピュータを経由して転送され、3台目のコンピュータで受信されて表示される。コンピュータには数字しか分からないが、この数字はさまざまなものを意味し得る。まいった、どうしたら良いのだろうか? そう、システムは「プレーンテキスト」と一緒に、文字コードの情報を送り届けるように設計しなければならないのだ。思い出してほしい。文字コードの情報は、機械が読める数字を人間が読める文字へマッピングする暗号解読の鍵だ。暗号解読の鍵がないということは、不明瞭な文章か、ちんぷんかんぷんな文章か、もっとめちゃくちゃな文章が得られることを意味している。
    Now think about the rise of global networks like email and the web. Lots of "plain text" flying around the globe, being authored on one computer, transmitted through a second computer, and received and displayed by a third computer. Computers can only see numbers, but the numbers could mean different things. Oh no! What to do? Well, systems had to be designed to carry encoding information along with every piece of "plain text." Remember, it's the decryption key that maps computer-readable numbers to human-readable characters. A missing decryption key means garbled text, gibberish, or worse.〔【出典】"Dive Into Python 3" by Mark Pilgrim 【和訳】Fukada & Fujimoto 【License】CC-BY-SA-3.0
  • 今度は、複数のテキストを同じ場所に格納しようとすることを考えてみよう。これは例えば、今までに受信したすべての電子メールを、データベースの同じテーブルに格納するような場合だ。ここでも、メールを正しく表示するためには、それぞれの文書と一緒にその文字コードを格納しておかなければならない。これは大変そうではないか? 電子メールのデータベースを検索しようとするときは、複数の文字コードを急いで変換しなければならない。これは楽しそうに思えるだろうか?
    Now think about trying to store multiple pieces of text in the same place, like in the same database table that holds all the email you've ever received. You still need to store the character encoding alongside each piece of text so you can display it properly. Think that's hard? Try searching your email database, which means converting between multiple encodings on the fly. Doesn't that sound fun?〔【出典】"Dive Into Python 3" by Mark Pilgrim 【和訳】Fukada & Fujimoto 【License】CC-BY-SA-3.0
  • 利点: 一般のASCII文字を扱う場合には非常に効率的な文字コードだ。拡張ラテン文字を扱う場合にもUTF-16より悪くなることはない。中国語をUTF-32で扱うよりは良い。そして、(詳細を示すつもりはないので、私の言うことを信じてもらうしかないのだが)このビット操作のもつ性質により、バイトオーダーの問題も発生しない。UTF-8でエンコードされた文章は、どのコンピュータ上でも全く同じバイトのストリームになる。
    Advantages: super-efficient encoding of common ASCII characters. No worse than UTF-16 for extended Latin characters. Better than UTF-32 for Chinese characters. Also (and you'll have to trust me on this, because I'm not going to show you the math), due to the exact nature of the bit twiddling, there are no byte-ordering issues. A document encoded in UTF-8 uses the exact same stream of bytes on any computer.〔【出典】"Dive Into Python 3" by Mark Pilgrim 【和訳】Fukada & Fujimoto 【License】CC-BY-SA-3.0
  • 図形文字コード
    graphic character code《コ》
  • 実際のところ、イエスだ。主要なウェブブラウザはどれも文字コードの自動検出機能を持っている。というのも、ウェブは文字コードの情報を一切含まないページで満ちあふれているからだ。Mozilla Firefoxには、文字コードの自動検出を行うオープンソースのライブラリが組み込まれている。私はこのライブラリをPython 2に移植し、それにchardetモジュールという名前を付けた。この章は、chardetモジュールをPython 2からPython 3へ移植する過程をステップバイステップで説明する。
    As it turns out, yes. All major browsers have character encoding auto-detection, because the web is full of pages that have no encoding information whatsoever. Mozilla Firefox contains an encoding auto-detection library which is open source. I ported the library to Python 2 and dubbed it the chardet module. This chapter will take you step-by-step through the process of porting the chardet module from Python 2 to Python 3.〔【出典】"Dive Into Python 3" by Mark Pilgrim 【和訳】Fukada & Fujimoto 【License】CC-BY-SA-3.0
  • 恐らく、アポストロフィがあるべき場所に奇妙なクエスチョンマーク状の文字が現れているWebページを見た経験があるだろう。大抵の場合、これはページの作者が文字コードを正しく宣言しておらず、ブラウザが文字コードを推測するしかなくなってしまい、本来表示されるべき文字とそうでない文字が混じり合った結果になってしまった、ということを意味している。英語では多少煩わしいだけだが、他の言語においては、全く読むことができないということにもなり得る。
    Surely you've seen web pages like this, with strange question-mark-like characters where apostrophes should be. That usually means the page author didn't declare their character encoding correctly, your browser was left guessing, and the result was a mix of expected and unexpected characters. In English it's merely annoying; in other languages, the result can be completely unreadable.〔【出典】"Dive Into Python 3" by Mark Pilgrim 【和訳】Fukada & Fujimoto 【License】CC-BY-SA-3.0
  • 現実の事情はもっと複雑だ。多くの文字は複数の文字コードにおいて共通して存在するが、個々の文字コードは、それらの文字を実際にメモリやディスクに格納する際に異なるバイト列を用いているかもしれない。つまり、文字コードというのは、暗号解読のための鍵のようなものだと捉えられる。だから、誰かからバイト列(それがファイルであれ、Webページであれ、その他何であれ)を受け取って、その内容が「テキスト」だと告げられた場合、そのバイトを文字へデコードするには、彼らが何の文字コードを使用したのかを知る必要がある。もし間違った鍵を渡されたり、あるいは全く何も渡してくれなかったら、自分自身で文字コードを解析するという嫌な作業をするしかなくなってしまう。たぶん、正しい文字コードを引き当てられず、めちゃくちゃな結果が返ってくるのがオチだろう。
    In reality, it's more complicated than that. Many characters are common to multiple encodings, but each encoding may use a different sequence of bytes to actually store those characters in memory or on disk. So you can think of the character encoding as a kind of decryption key. Whenever someone gives you a sequence of bytes -- a file, a web page, whatever -- and claims it's "text," you need to know what character encoding they used so you can decode the bytes into characters. If they give you the wrong key or no key at all, you're left with the unenviable task of cracking the code yourself. Chances are you'll get it wrong, and the result will be gibberish.〔【出典】"Dive Into Python 3" by Mark Pilgrim 【和訳】Fukada & Fujimoto 【License】CC-BY-SA-3.0
  • 要するに、どの文字コードで符号化されたのか分からないバイト列を受け取って、その文字コードを推測することでテキストを読み込めるようにしようというわけだ。これは、復号鍵を知らない状態で暗号を解読しようとするのに似ている。
    It means taking a sequence of bytes in an unknown character encoding, and attempting to determine the encoding so you can read the text. It's like cracking a code when you don't have the decryption key.〔【出典】"Dive Into Python 3" by Mark Pilgrim 【和訳】Fukada & Fujimoto 【License】CC-BY-SA-3.0
  • 言い換えれば、文字コードの検出というのは、実際には言語の検出に、どの言語がどの文字コードを使う傾向にあるかという知識を組み合わせたものと言える。
    In other words, encoding detection is really language detection, combined with knowledge of which languages tend to use which character encodings.〔【出典】"Dive Into Python 3" by Mark Pilgrim 【和訳】Fukada & Fujimoto 【License】CC-BY-SA-3.0