diff --git a/ChangeLog b/ChangeLog index 9f2bf0f4e..4195f7c49 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-01-12 Mike Kestner + + * sources/MethodBody.cs : use Utf8.GetByteCount for hidden len params. + [Fixes #77097] + 2005-01-11 Mike Kestner * bootstrap-2.8 : bump version to 2.8.0 diff --git a/generator/MethodBody.cs b/generator/MethodBody.cs index 021dd3f1b..bb0ca689e 100644 --- a/generator/MethodBody.cs +++ b/generator/MethodBody.cs @@ -71,7 +71,7 @@ namespace GtkSharp.Generation { } } else if (i > 0 && parameters [i - 1].IsString && p.IsLength) { string string_name = (i == 1 && is_set) ? "value" : parameters [i - 1].Name; - result[i] = igen.CallByName (CastFromInt (p.CSType) + string_name + ".Length"); + result[i] = igen.CallByName (CastFromInt (p.CSType) + "System.Text.Encoding.UTF8.GetByteCount (" + string_name + ")"); continue; } else if (p.IsArray && p.MarshalType != p.CSType) { result[i] = "native_" + p.Name;