forked from github/server
Merge branch 'develop' of github.com:ennorehling/eressea into develop
This commit is contained in:
commit
ef71a78cd0
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
while [ ! -z $1 ] ; do
|
||||
tmpfile=$(mktemp eressea.XXX)
|
||||
iconv -f latin1 -t utf-8 < $1 | \
|
||||
perl -pe 's/ß/ss/; s/ä/ae/; s/ü/ue/; s/ö/oe/;' \
|
||||
> $tmpfile && \mv $tmpfile $1
|
||||
file $1
|
||||
shift 1
|
||||
done
|
|
@ -56,7 +56,7 @@ size_t unicode_utf8_trim(char *buf)
|
|||
++result;
|
||||
}
|
||||
}
|
||||
if (op == buf && (iswcntrl(wc) || iswspace(wc))) {
|
||||
if (op == buf && (iswspace(wc) || !iswprint(wc))) {
|
||||
result += size;
|
||||
}
|
||||
else if (wc>255 || !iscntrl(wc)) {
|
||||
|
@ -64,7 +64,7 @@ size_t unicode_utf8_trim(char *buf)
|
|||
memmove(op, ip, size);
|
||||
}
|
||||
op += size;
|
||||
if (iswcntrl(wc) || iswspace(wc)) {
|
||||
if (iswspace(wc) || !iswprint(wc)) {
|
||||
ts += size;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -19,8 +19,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#ifndef _UNICODE_H
|
||||
#define _UNICODE_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
Loading…
Reference in New Issue