Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to tanslate Korean to English through PL/SQL

73661Aug 4 2011 — edited Aug 5 2011
The following blocks can translate English to Korean. But how can I translate Korean into English? utl_url.ESCAPE does not work when Korean or other double byte characters passed in.

SET define OFF
SET serveroutput ON

BEGIN
DECLARE
txt VARCHAR2(100);
tlum VARCHAR2(200);
tlum_out VARCHAR2(200);
BEGIN
txt:=utl_url.ESCAPE('This is a new world');
tlum := REGEXP_SUBSTR(httpuritype ('http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q='||txt||'&langpair=en|ko').getclob (),'".*?"' ,1,3);
DBMS_OUTPUT.PUT_LINE(tlum);
COMMIT;
END;
END;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 2 2011
Added on Aug 4 2011
1 comment
457 views