/* * utf8.c: * * Copyright (c) 2008 James McKenzie , * All rights reserved. * */ static char rcsid[] = "$Id$"; /* * $Log$ * Revision 1.1 2008/02/22 19:12:05 james * *** empty log message *** * */ #include "project.h" /*FIXME: for the moment we bodge utf8 support*/ if ((ch>=0xc0) && (ch<0xe0)) /*Start of two byte unicode sequence*/ { p->in_utf8=2; } else if ((ch>=0xe0) && (ch<0xf0)) /*Start of three byte unicode sequence*/ { p->in_utf8=3; } else if ((ch>=0xf0) && (ch<0xf7)) /*Start of four byte unicode sequence*/ p->in_utf8=4; } if (p->utf_8) { p->in_utf8--; ch='?'; } if (!p->utf_8) { /*Not first or last byte in sequence*/