Oracle handles special characters

Source: Internet
Author: User
Tags chr

Check the database-level parameter settings

SELECT * from Nls_database_parameters;

Check the parameter settings at the instance level

SELECT * FROM Nls_instance_parameters

Check the session-level parameter settings

SELECT * FROM Nls_session_parameters

Check your local language environment

SELECT USERENV (' LANGUAGE ') from DUAL;

Simplified Chinese_china. Zhs16gbk

Start processing

    1. ASCII Code for queries

SELECT ASCII () from DUAL;

You can see that the ASCII code for this character is 7

2. Anti-write confirmation is consistent

SELECT CHR (7) from DUAL;

No problem

--------------------------------------------------------------------------------------------------------------- ------------

Question: Because the book author has a special character ", so the page shows that the book author has errors, always appear ' & #8226; '.  The phenomenon is obviously not normal display, so when inputting data with the replace () function to make a judgment, using the following characters ' & #8226; ' Replace with Chr (7). As follows:

Replace (Bk_author, ' & ' | | ' #8226; ', Chr (7)) because ' & ' is the identifier of the Oracle bound variable, so the ' & ' is handled

The following ASCII codes with other special characters

DECLARE

V01 VARCHAR2 (5);

BEGIN

For I in 1..100 LOOP

SELECT CHR (I) into V01 from DUAL;

Dbms_output. Put_Line (' Chr ' | | i| | ' is ' | | V01);

END LOOP;

END;

Https://it.wikipedia.org/wiki/ASCII

Oracle handles special characters

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.