several fixes
This commit is contained in:
parent
9ee8791415
commit
08a811315b
3 changed files with 7 additions and 0 deletions
|
|
@ -5,9 +5,12 @@
|
||||||
#include "sj_string.h"
|
#include "sj_string.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#ifdef UCS
|
#ifdef UCS
|
||||||
static u_int ucs_to_euc(u_int in) {
|
static u_int ucs_to_euc(u_int in) {
|
||||||
|
if(in == 0x3094) in = 0x30f4;
|
||||||
|
|
||||||
if(in <= 0xffff) {
|
if(in <= 0xffff) {
|
||||||
const T_U2E_BITMAP_INDEX* b = &utf16_to_euc_jp_table[(in >> 8) & 0xff];
|
const T_U2E_BITMAP_INDEX* b = &utf16_to_euc_jp_table[(in >> 8) & 0xff];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,8 @@ Sj4Ime* sj4_ime(int charset, const char* dict, Sj4ImePacket packet) {
|
||||||
ime->charset = charset;
|
ime->charset = charset;
|
||||||
|
|
||||||
ime->packet = packet;
|
ime->packet = packet;
|
||||||
|
|
||||||
|
return ime;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int w_len(wchar_t* wc) {
|
static int w_len(wchar_t* wc) {
|
||||||
|
|
|
||||||
|
|
@ -198,6 +198,8 @@ void utf8_print(char* out, int c) {
|
||||||
|
|
||||||
#ifdef UTF8
|
#ifdef UTF8
|
||||||
int unicode_to_eucjp(int utf) {
|
int unicode_to_eucjp(int utf) {
|
||||||
|
if(utf == 0x3094) utf = 0x30f4;
|
||||||
|
|
||||||
if(0 <= utf && utf <= 0xffff) {
|
if(0 <= utf && utf <= 0xffff) {
|
||||||
const T_U2E_BITMAP_INDEX* b = &utf16_to_euc_jp_table[(utf >> 8) & 0xff];
|
const T_U2E_BITMAP_INDEX* b = &utf16_to_euc_jp_table[(utf >> 8) & 0xff];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue