[英]“¿” (inverted question mark) character in oracle
I found " ¿
" character (inverted question mark) in the database tables in place of single quote ( '
) character. 我在数据库表中找到了“
¿
”字符(反问号),代替了单引号( '
)字符。
Can any one let me know how i can avoid this character from the table. 任何人都可以让我知道如何避免出现在表中这个字符。
There are many rows which contains the text with this character but not all single quotes are turning to this ¿ symbol. 有很多行包含带有该字符的文本,但是并非所有的单引号都转至该符号。
I am not even able to filter the rows to update this character (¿) with single quote again. 我什至无法过滤行以再次用单引号更新此字符(¿)。
When i user Like "%¿%" it filters me the text containing ordinary question mark (?) 当我使用“%¿%”这样的名称时,它会过滤掉包含普通问号(?)的文本
In general there are two possibilities: 通常有两种可能性:
¿
characters caused by wrong NLS_LANG
settings when data was inserted (or the database character set does not support the special character). ¿
造成错误的字符NLS_LANG
设置时插入数据(或数据库的字符集不支持特殊字符)。 In such case the LIKE '%¿%'
condition should work. LIKE '%¿%'
条件。 However, this also means you have corrupt data in your database and it is almost impossible to correct them because ¿
stands for any wrong character. ¿
代表任何错误的字符。 NLS_LANG
settings or the font does not support the special character. NLS_LANG
设置引起的特殊字符,或者字体不支持特殊字符。 Which client do you use (SQL*Plus, TOAD, SQL Developer, etc.)? 您使用哪个客户端(SQL * Plus,TOAD,SQL Developer等)?
What is your NLS_LANG
Environment variable, resp. 您的
NLS_LANG
环境变量分别是什么。 your Registry key HKLM\\SOFTWARE\\ORACLE\\KEY_%ORACLE_HOME_NAME%\\NLS_LANG
or HKLM\\SOFTWARE\\Wow6432Node\\ORACLE\\KEY_%ORACLE_HOME_NAME%\\NLS_LANG
? 您的注册表项
HKLM\\SOFTWARE\\ORACLE\\KEY_%ORACLE_HOME_NAME%\\NLS_LANG
还是HKLM\\SOFTWARE\\Wow6432Node\\ORACLE\\KEY_%ORACLE_HOME_NAME%\\NLS_LANG
?
What do you get when you select DUMP(... , 1016)
from your table? 从表中选择
DUMP(... , 1016)
得到什么?
Was it really a simple quote (ASCII 39)? 这真的是一个简单的报价(ASCII 39)吗? If they actually were some sort of "smart quotes", those do have mappings in windows-1252 but there is no ISO-8859 mapping for them, so if your database charset is ISO-8859-1 and you try to insert some windows-1252 text, Oracle tries to translete from windows-1252 to ISO-8859-1 and uses chr(191) to signal an unmappable character.
如果它们实际上是某种“智能引号”,则它们确实在Windows-1252中具有映射,但是没有针对它们的ISO-8859映射,因此,如果您的数据库字符集是ISO-8859-1,则尝试插入一些Windows- 1252文本,Oracle尝试从Windows-1252转换为ISO-8859-1,并使用chr(191)表示不可映射的字符。 chr(191) happens to be the opening question mark.
chr(191)恰好是开头的问号。
You can check that by executing this (copy the select to preserve the smart quotes): 您可以通过执行以下操作来检查(复制选择以保留智能报价):
select dump('‘’“”') from dual
This behaviour is basically "correct", as what you are asking Oracle to do cannot be done, though it is not very intuitive. 这种行为基本上是“正确的”,因为您要求Oracle执行的操作虽然不是很直观,但却无法完成。
See windows-1252 , ISO8859-1 and ISO-8859-15 charsets for comparison. 请参阅Windows-1252 , ISO8859-1和ISO-8859-15字符集进行比较。 Note that windows uses the range 127-159 that is not used in the ISO charsets
请注意,Windows使用ISO字符集未使用的范围127-159
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.