Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot insert degree character (°) through OCI

I'm using CodeIgniter with OCI10 driver and I have a problem inserting the degree character (°) into database when using binding. However the error message is empty

Message: Query ' INSERT INTO T1 (ID, TEXT) VALUES (1, 'text with °') ' was not executed; returned error: ''.

When I use SQL Relay or insert manualy with SQL Developer, it's wokring fine. Also when I don't use the binding, it is inserted correctly.

like image 944
Tomas Jancik Avatar asked May 28 '13 12:05

Tomas Jancik


People also ask

How do I insert a degree symbol?

Place the cursor where you want to insert the degree symbol. On your keyboard, press Alt + 0176. Note: This method works only for keyboards that include a 10-key numeric pad.

How do I type the degree symbol and paste?

Press and hold the ALT key and type 0 1 7 6 on the numeric keypad of your keyboard. Make sure the NumLock is on and type 0176 with the leading zero. If there is no numeric keypad, press and hold the Fn before typing the 0176 numbers of degree symbol.

How do you show degrees in text?

Hold down the "Alt" key on your keyboard. At the same time, press "0176" on your keyboard. Release the "Alt" key on your keyboard. The degree symbol can then appear on your screen.

How do you insert a degree symbol in a text box?

You can press the Alt key in combination with numbers on the numeric keypad to insert the degree symbol. To insert the degree symbol in a Word document using an Alt code keyboard shortcut: Position the cursor where you want to insert the degree symbol. Press Alt + 0176 or Alt + 248 on the numeric keypad.

How to insert degree symbols in Microsoft Excel?

Select the target cell for the degree symbol. Go to the Insert tab and select the Symbol button from the Symbols You should have access to the Symbol window now. In the Character code text box, enter the code 0020 to locate the degree symbol. The Unicode name confirms that 00B0 is a degree symbol. Click on the Insert command button of the window.

How to determine the character set of a string in OCI?

OCI environment or user session handle to determine the character set OCIWchar *OCIWideCharStrchr (dvoid *hndl, CONST OCIWchar *wstr, OCIWchar wc) This function searches for the first occurrence of wc in the wchar string pointed to by wstr.

What is OCI error get() function?

The OCI environment or user session handle initialized in object mode The OCI error handle. If there is an error, then it is recorded in errhp and the function returns a NULL pointer. Diagnostic information can be obtained by calling OCIErrorGet (). Pointer to the destination buffer.

What is a null pointer in OCI?

Pointer to an OCI environment or user session handle for message language The OCI error handle. If there is an error, it is recorded in errhp, and the function returns a NULL pointer. Diagnostic information can be obtained by calling OCIErrorGet (). A pointer to a product name. The product name is used to locate the directory for messages.


1 Answers

$this->db->db_set_charset('latin1', 'latin1_swedish_ci'); Use this while inserting record

like image 176
Uresh Patel Avatar answered Sep 23 '22 22:09

Uresh Patel