在oracle中将特殊字符转换为纯文本 [英] Converting special character to plain text in oracle

查看:1195
本文介绍了在oracle中将特殊字符转换为纯文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个数据库utf8作为字符集。现在在一个表中,我们有一个价值像
'HERBES-Herbeàpoux'。现在我们要把它转换成HERBES-Herbe a poux。即a→a。
我们不能有一个替换函数,因为值是动态的。

we are having a database with utf8 as charset. now in one table we are having a value like 'HERBES-Herbe à poux' . now we have to convert it into 'HERBES-Herbe a poux' . i.e à-->a. We cannot have a replace function since the values are dynamic.

请帮助我们。

推荐答案

什么构成一个特殊字符给你?任何在US7ASCII字符集之外的东西?

What constitutes a "special character" to you? Anything outside the US7ASCII character set?

您可以使用 CONVERT 函数

You can potentially use the CONVERT function

SELECT convert( <<your string>>, 'US7ASCII' )
  FROM table_name



<假设有一个特定字符到US7ASCII字符集的映射,该映射将用于替换字符。如果没有定义映射,则字符将替换为默认替换字符,问号?。

Assuming that there is a mapping for the particular character to the US7ASCII character set, that mapping will be used to replace the character. If there is no mapping defined, the character will be replaced by the default replacement character, a question mark "?".

这篇关于在oracle中将特殊字符转换为纯文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆