Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 512565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:19:58+00:00 2026-05-13T07:19:58+00:00

I have input data coming from a flat file which has english, japanese, chinese

  • 0

I have input data coming from a flat file which has english, japanese, chinese characters in one column.
I am loading these values in a staging table column whose schema definition is VARCHAR2(250 CHAR), the main table column has definition VARCHAR2(250) WHICH i can not change.
So, i am doing a SUBSTR on this column. After loading the table when i did a

SELECT * FROM TABLE

…I get this error :

ORA-29275: partial multibyte character

If i select other columns then no issues.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:19:58+00:00Added an answer on May 13, 2026 at 7:19 am

    you should use SUBSTRB when you copy your data from your 250 CHAR column to your 250 byte column. This function will only output whole characters (you won’t get incomplete unicode characters):

    SQL> select substrb('中华人', 1, 9) ch9,
      2         substrb('中华人', 1, 8) ch8,
      3         substrb('中华人', 1, 7) ch7,
      4         substrb('中华人', 1, 6) ch6,
      5         substrb('中华人', 1, 5) ch5
      6    FROM dual;
    
    CH9       CH8      CH7     CH6    CH5
    --------- -------- ------- ------ -----
    中华人       中华       中华      中华     中
    

    Edit:

    @mwardm made an interesting comment concerning the actual length of the resulting string and whether the resulting string could contain an invalid sequence of bytes. Consider the following on an AL32UTF8 DB:

    SQL> select lengthb('ÏÏÏ'),
      2         lengthb(substrb('ÏÏÏÏÏÏ', 1, 5)),
      3         dump('ÏÏÏ'),
      4         dump(substrb('ÏÏÏÏÏÏ', 1, 5))
      5    FROM dual;
    
    LE LE DUMP('ÏÏÏ')                           DUMP(SUBSTRB('ÏÏÏÏÏÏ',1,5))
    -- -- ------------------------------------- -------------------------------
     6  5 Typ=96 Len=6: 195,143,195,143,195,143 Typ=1 Len=5: 195,143,195,143,32
    

    As you can see the last byte of the substrb string is not the truncated first byte of the special character but encodes a legit character (The first 128 characters in this character set are the same as the ASCII7US character set so this encodes the ' ' space character, using RTRIM as suggested in another answer will remove the last character).

    Furthermore, I also got this interesting result using the character set AL16UTF16:

    SQL> select lengthb(N'ĈĈ') le,
      2         dump(N'ĈĈ') dump,
      3         lengthb(substrb(N'Ĉ', 1, 3)) length_substr,
      4         dump(substrb(N'ĈĈ', 1, 3)) dump_substr
      5    from dual;
    
            LE DUMP                    LENGTH_SUBSTR DUMP_SUBSTR
    ---------- ----------------------- ------------- -----------------
             4 Typ=96 Len=4: 1,8,1,8               2 Typ=1 Len=2: 1,8
    

    In this case Oracle has choosen to cut the string after the second byte because in the AL16UTF16 character set there is no legit one-byte character. The resulting string is only 2 bytes instead of 3.

    This would need further testing and is by no mean a rigorous demonstration but I still stand by my first hunch that substrb will return a valid sequence of bytes that encodes a valid string of characters.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an XSLT in which I create (from the input data) intermediary variables
I have an iPhone app which has a Table View-based data input screen with
I have a streaming input which has repeated values. I can use any data
I have some data (which users input using WYSIWYG editor). I have created a
In my application, I have URN-identified data coming in from the server. I'm in
I have the following JSON string coming from external input source: {value: "82363549923gnyh49c9djl239pjm01223", id:
I have an input edit field where the user can enter data. I want
I have some html like the following: <div class=control-group> <input type=text data-bind=value: $data.DealCode name=DealCode
In my scenario, I have a program that analyzes data input files and produces
i have form with user data to input and javascript ajax to send information

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.