URL编码
来源:互联网 发布:java aspectj 异常 编辑:程序博客网 时间:2024/06/09 14:54
FString UMyGameInstance::UrlEncode(const FString &UnencodedString){FTCHARToUTF8 Converter(*UnencodedString);//url encoding must be encoded over each utf-8 byteconst UTF8CHAR* UTF8Data = (UTF8CHAR*)Converter.Get();//converter uses ANSI instead of UTF8CHAR - not sure why - but other code seems to just do this cast. In this case it really doesn't matterFString EncodedString = TEXT("");TCHAR Buffer[2] = { 0, 0 };for (int32 ByteIdx = 0, Length = Converter.Length(); ByteIdx < Length; ++ByteIdx){UTF8CHAR ByteToEncode = UTF8Data[ByteIdx];if (ByteToEncode != ' '&& IsAllowedChar(ByteToEncode)){Buffer[0] = ByteToEncode;FString TmpString = Buffer;EncodedString += TmpString;}else if (ByteToEncode == ' '){EncodedString += "+";}else if (ByteToEncode != '\0'){EncodedString += TEXT("%");EncodedString += FString::Printf(TEXT("%.2X"), ByteToEncode);}}return EncodedString;}
阅读全文
0 0
- url编码
- URL编码
- URL编码
- URL编码
- url 编码
- URL编码
- URL编码
- URL编码
- Url编码
- URL编码
- URL编码
- URL编码
- URL编码
- url编码
- url编码
- URL编码
- url编码
- url编码
- 说说Android CoordinatorLayout
- java反转排序
- GIF文件学习
- 应用程序无法启动,因为应用程序的并行配置不正确...解决方法
- Date类
- URL编码
- SpingMvc详解
- 463. Island Perimeter
- Spark2.0-RDD分区原理分析
- 栈的链接存储结构及实现
- 【qt】程序忙碌时的进度条
- C语言中指针和自增运算符结合时的运算顺序问题
- Python的基础语法
- mysql 数据统计 分区函数