NetSurf
Functions | Variables
ucstables.h File Reference

UCS conversion tables (interface) This is only used if nothing claims Service_International,8. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

nserror utf8_to_local_encoding (const char *string, size_t len, char **result)
 Convert a UTF-8 encoded string into the system local encoding. More...
 
nserror utf8_from_local_encoding (const char *string, size_t len, char **result)
 Convert a string encoded in the system local encoding to UTF-8. More...
 
const int * ucstable_from_alphabet (int alphabet)
 Retrieve UCS table (above), given alphabet number. More...
 

Variables

struct gui_utf8_tableriscos_utf8_table
 

Detailed Description

UCS conversion tables (interface) This is only used if nothing claims Service_International,8.

Definition in file ucstables.h.

Function Documentation

◆ ucstable_from_alphabet()

const int * ucstable_from_alphabet ( int  alphabet)

Retrieve UCS table (above), given alphabet number.

Parameters
alphabetThe RISC OS alphabet number
Returns
pointer to table, or NULL if not found

Definition at line 328 of file ucstables.c.

References cyrillic_table, greek_table, hebrew_table, latin10_table, latin1_table, latin2_table, latin3_table, latin4_table, latin5_table, latin6_table, latin7_table, latin8_table, latin9_table, and welsh_table.

Referenced by ro_gui_wimp_event_keypress().

Here is the caller graph for this function:

◆ utf8_from_local_encoding()

nserror utf8_from_local_encoding ( const char *  string,
size_t  len,
char **  result 
)

Convert a string encoded in the system local encoding to UTF-8.

Parameters
stringThe string to convert
lenThe length (in bytes) of the string, or 0
resultPointer to location in which to store result
Returns
An nserror code

Definition at line 80 of file utf8.c.

References ami_utf8_codesets(), localencodings, NSERROR_BAD_ENCODING, NSERROR_NOMEM, NSERROR_OK, NSLOG, nsoption_charp, result, special_chars, SPECIAL_CHUNK_SIZE, strndup(), and utf8_from_enc().

Referenced by ami_clipboard_cat_collection(), ami_gui_hotlist_add(), ami_key_to_nskey(), ami_to_utf8_easy(), on_file_dropped(), ro_gui_selection_prepare_paste_dataload(), ro_gui_url_bar_get_url(), ro_gui_window_import_text(), and toolbar_key_input().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ utf8_to_local_encoding()

nserror utf8_to_local_encoding ( const char *  string,
size_t  len,
char **  result 
)

Convert a UTF-8 encoded string into the system local encoding.

Parameters
stringThe string to convert
lenThe length (in bytes) of the string, or 0
resultPointer to location in which to store result
Returns
An nserror code

Definition at line 89 of file utf8.c.

References ami_utf8_codesets(), ASPrintf(), localencodings, NOF_ELEMENTS, NSERROR_BAD_ENCODING, NSERROR_NOMEM, NSERROR_OK, nsoption_charp, result, special_chars, strndup(), utf8_next(), and utf8_to_enc().

Referenced by ami_utf8_easy(), amiga_bm_nsfont_position_in_string(), amiga_bm_nsfont_split(), amiga_bm_nsfont_text(), amiga_bm_nsfont_width(), gui_download_window_create(), gui_get_clipboard(), gui_set_clipboard(), gui_window_set_title(), query_user_xy(), ro_gui_download_update_status(), ro_gui_interactive_help_broadcast(), ro_gui_menu_translate(), ro_gui_save_clipboard(), ro_gui_save_drag_end(), ro_gui_save_set_state(), ro_gui_set_icon_string(), ro_gui_set_window_title(), ro_gui_url_bar_set_url(), and ro_gui_window_prepare_form_select_menu().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ riscos_utf8_table

struct gui_utf8_table* riscos_utf8_table
extern

Definition at line 725 of file ucstables.c.

Referenced by main().