add some utf8 getbytes help functions
parent
7b5934ea26
commit
c39ffa4dd1
|
@ -72,6 +72,12 @@ namespace OpenSim.Framework
|
|||
return sb.ToString();
|
||||
}
|
||||
|
||||
public static byte[] EndToNBBytes(StringBuilder sb)
|
||||
{
|
||||
sb.Append("</llsd>");
|
||||
return Util.UTF8NBGetbytes(sb.ToString());
|
||||
}
|
||||
|
||||
// map == a list of key value pairs
|
||||
public static void AddMap(StringBuilder sb)
|
||||
{
|
||||
|
|
|
@ -247,6 +247,18 @@ namespace OpenSim.Framework
|
|||
public static Encoding UTF8 = Encoding.UTF8;
|
||||
public static Encoding UTF8NoBomEncoding = new UTF8Encoding(false);
|
||||
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public static byte[] UTF8Getbytes(string s)
|
||||
{
|
||||
return UTF8.GetBytes(s);
|
||||
}
|
||||
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
|
||||
public static byte[] UTF8NBGetbytes(string s)
|
||||
{
|
||||
return UTF8NoBomEncoding.GetBytes(s);
|
||||
}
|
||||
|
||||
/// <value>
|
||||
/// Well known UUID for the blank texture used in the Linden SL viewer version 1.20 (and hopefully onwards)
|
||||
/// </value>
|
||||
|
|
Loading…
Reference in New Issue