change chat ty byte
This commit is contained in:
@@ -15,7 +15,7 @@ namespace ndefpclib.message.Text
|
||||
/// <param name="content"> The content. </param>
|
||||
/// <param name="encoding"> The encoding. </param>
|
||||
/// <param name="lang"> The language. </param>
|
||||
public TextMessage(string content, char encoding, string lang)
|
||||
public TextMessage(string content,byte encoding, string lang)
|
||||
: base(content, new TextType(encoding,lang))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -11,16 +11,16 @@ namespace ndefpclib.type.Const
|
||||
public class TextEncoding
|
||||
{
|
||||
/// <summary> The UTF 8. </summary>
|
||||
public const char UTF8 = '\x02';
|
||||
public const byte UTF8 = 0x02;
|
||||
|
||||
/// <summary> The UTF 16. </summary>
|
||||
public const char UTF16 = '\x82';
|
||||
public const byte UTF16 = 0x82;
|
||||
|
||||
/// <summary> Gets an encoding. </summary>
|
||||
/// <remarks> Stubbfel, 23.10.2013. </remarks>
|
||||
/// <param name="input"> The input. </param>
|
||||
/// <returns> The encoding. </returns>
|
||||
public static Encoding GetEncoding(char input)
|
||||
public static Encoding GetEncoding(byte input)
|
||||
{
|
||||
switch (input)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace ndefpclib.type
|
||||
/// <remarks> Stubbfel, 23.10.2013. </remarks>
|
||||
/// <param name="encoding"> (Optional) the encoding. </param>
|
||||
/// <param name="lang"> (Optional) the language. </param>
|
||||
public TextType(char encoding = TextEncoding.UTF8, string lang = Language.DE)
|
||||
public TextType(byte encoding = TextEncoding.UTF8, string lang = Language.DE)
|
||||
{
|
||||
this.TNFValue = TNFVAL.WKT;
|
||||
this.TypeValue = TYPEVAL.TEXT;
|
||||
@@ -40,7 +40,7 @@ namespace ndefpclib.type
|
||||
return null;
|
||||
}
|
||||
|
||||
char encoding = (char)array[index + 4];
|
||||
byte encoding = array[index + 4];
|
||||
Encoding encoder = TextEncoding.GetEncoding(encoding);
|
||||
|
||||
if (encoder == null)
|
||||
|
||||
Reference in New Issue
Block a user