找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 735|回复: 0

VB.NET UTF-8转ANSI

[复制链接]

497

主题

30

回帖

7182

积分

管理员

积分
7182
发表于 2023-8-26 09:54:17 | 显示全部楼层 |阅读模式
Imports System
Imports System.IO
Imports System.Text



Dim sr As StreamReader
Dim sw As StreamWriter
sr = New StreamReader(utf-8_file_path, System.Text.Encoding.UTF8)
sw = New StreamWriter(ansi_file_path, True, System.Text.Encoding.Default)
Dim linecontent As String
While Not sr.EndOfStream
    linecontent = sr.ReadLine
    sw.WriteLine(linecontent)
End While
sr.Close()
sw.Close()

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|爱淘机论坛 ( 鲁ICP备2022040313号-4 )

GMT+8, 2024-5-3 09:38 , Processed in 0.024736 second(s), 23 queries .

Powered by 爱淘机论坛

© 2001-2023

快速回复 返回顶部 返回列表