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.
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.
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.
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.
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.
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.
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.
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.
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.
$this->db->db_set_charset('latin1', 'latin1_swedish_ci'); Use this while inserting record
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With