dlugolecki.net.pl
Dziennik
Polecane
Software
projects
/
gedcom-parse.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improved context handling, to allow elements out of context.
[gedcom-parse.git]
/
gedcom
/
encoding.c
diff --git
a/gedcom/encoding.c
b/gedcom/encoding.c
index 1cae728808f5c8dfd9f9cf6556f4c575a20e78dd..c2c3e8980686ae72d30f79d29057f988de278bb1 100644
(file)
--- a/
gedcom/encoding.c
+++ b/
gedcom/encoding.c
@@
-89,6
+89,10
@@
char* get_encoding(const char* gedcom_n, Encoding enc)
key = (char*)malloc(strlen(gedcom_n) + strlen(charwidth_string[enc]) + 3);
if (key) {
key = (char*)malloc(strlen(gedcom_n) + strlen(charwidth_string[enc]) + 3);
if (key) {
+ char* sp_pos = NULL;
+ while ((sp_pos = strchr(gedcom_n, ' ')) != NULL) {
+ *sp_pos = '_';
+ }
/* sprintf is safe here (malloc'ed before) */
sprintf(key, "%s(%s)", gedcom_n, charwidth_string[enc]);
/* sprintf is safe here (malloc'ed before) */
sprintf(key, "%s(%s)", gedcom_n, charwidth_string[enc]);