对“”“”进行编码ISO-8859-1 Oracle 数据库中的字符
是否可以在字符集为 ISO-8859-1 的 Oracle 数据库中插入“€”(作为 VARCHAR)?
我想将我的数据库从 ISO-8859-1 字符集移动到 ISO-8859-15 字符集(甚至 WINDOWS-1252 字符集也适合),以便将“€”存储在我的数据库中,但有人告诉我,使用 ISO- 8859-1 数据库字符集,可以直接存储我的“€”字符。
所以问题是,目前我正在尝试为 ISO-8859-1 数据库>找到这个解决方案有一种方法可以插入“€”(取决于客户端/驱动程序/等的字符集,但不取决于数据库的字符集)
您对此有何看法?
如果这是真的,那么为什么我们必须为 Oracle 数据库定义字符集?有人告诉我,这只是为了Oracle“知道需要多少字节来编码字符”(因此选择一个字符集相当于只为Oracle选择一些位来编码每个字符。结论:ISO-8859 -1 = ISO-8859-15-WINDOWS = 1252 在某些方面对于 Oracle 因为所需的位数是相同的......)
我希望我(几乎)很清楚......但是在我看来 我认为我将永远能够在 ISO-8859-1 数据库上执行 INSERT(使用“€”)和 SELECT 并检索我的“€”...
感谢读我的..
(PS:数据库是10g版本)
Is it possible to insert the "€" (as a VARCHAR) in a Oracle Database whose character set is : ISO-8859-1 ?
I want to move from ISO-8859-1 to ISO-8859-15 charset (or even WINDOWS-1252 charset will fit) my database in order to store the "€" in my database, but one told me that with a ISO-8859-1 charset for the database, it WOULD BE possible to store directly my "€" char.
So the problem is that for the moment, I am trying to find this solution for the ISO-8859-1 database > There would be a mean to insert the "€" (depending on charset of the clients/drivers/etc., but not depending on the charset of the database)
What is your point of view about that.. ?
If it is true, then why do we have to define a character set for the Oracle database ? One told me that this is just for Oracle "to know how many bytes are needed to encode the character" (and therefore to choose a charset is equivalent to only choose a number of bits for Oracle to encode each character. conclusion: ISO-8859-1 = ISO-8859-15-WINDOWS = 1252 in some ways for Oracle because the number of needed bits are the same...)
I hope I am (almost) clear.. But in my opinion I think that I will never be able to perform an INSERT (with "€") and SELECT and retrieve my "€" on a ISO-8859-1 database...
Thanks for reading me..
(PS: database is 10g version)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ISO-8859-1 中未分配
€
字符。因此你无法代表它。与 ISE-8859-15 中相同的字节用于表示¤
(货币通用符号)。来源
Oracle 需要了解什么字符设置它将出于以下目的对数据库进行编码:
The
€
character is not assigned in ISO-8859-1. Therefore there is no way you can represent it. The same byte as in ISE-8859-15 is used to represent¤
(monetary general symbol).Source
Oracle needs knowing in what character set it will encode the database for the following purposes: