<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/4.1.92">
</HEAD>
<BODY>
I build a data access layer in c++. This layer works with mongo db where string are always encoded using UTF-8. I've ported this layer in D using swig. String is written correctly in console but when i use std.regex sometimes it gives an exception:<BR>
<BR>
<A HREF="mailto:core.exception.UnicodeException@src">core.exception.UnicodeException@src</A>/rt/util/utf.d(290): invalid UTF-8 sequence<BR>
<BR>
Byte sequence (for better undestanding) is:<BR>
[83, 195, 179, 32]<BR>
<BR>
And the string was "Sò " (with accented o and a space)<BR>
<BR>
I'm not a utf expert, so Is it a wrong utf-8 encoding or it is a bug on utf.d? <BR>
<BR>
</BODY>
</HTML>