summaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2012-10-04 23:57:06 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-10-05 23:44:54 +0900
commit3e7780e7cd98549c40ef3e95faf002120a212997 (patch)
tree2fb03b3c72e83e70a8815aa3ee8bf6c34f01cce3 /profile.c
parentb272fb8c3b7c552e4519d4e19af99d8139eaf733 (diff)
downloadsubsurface-3e7780e7cd98549c40ef3e95faf002120a212997.tar.gz
Added unicode support for the configuration entries on Windows
windows.c: Windows's registry (which is technically a filesystem) uses UTF-16 for its "keys". This forces us to convert each of our UTF-8 (GLib, GTK) configuration entries if we want to store special characters. To do that we use the RegQueryValueExW() and do some conversation around the function call itself. The opposite happens when we require a UTF-16 value to be read from the registry and converted to UTF-8 in subsurface_set_conf(). An addition to this patch is a somehow expandable buffer in windows.c: subsurface_get_conf(). We increase the size of the buffer in chunks of 64 bytes, until RegQueryValueExW() is able to write to it (as suggested by the WINAPI documentation). Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.c')
0 files changed, 0 insertions, 0 deletions