feat: more charsets
This commit is contained in:
parent
d88cc8a01b
commit
05dda46484
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "text-recover",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@ -17,6 +17,7 @@
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli": "^1",
|
||||
"@types/node": "^20.11.27",
|
||||
"@vicons/ionicons5": "^0.12.0",
|
||||
"@vitejs/plugin-vue": "^5.0.4",
|
||||
"less": "^4.2.0",
|
||||
"naive-ui": "^2.38.1",
|
||||
|
7
pnpm-lock.yaml
generated
7
pnpm-lock.yaml
generated
@ -19,6 +19,9 @@ devDependencies:
|
||||
'@types/node':
|
||||
specifier: ^20.11.27
|
||||
version: 20.11.27
|
||||
'@vicons/ionicons5':
|
||||
specifier: ^0.12.0
|
||||
version: 0.12.0
|
||||
'@vitejs/plugin-vue':
|
||||
specifier: ^5.0.4
|
||||
version: 5.0.4(vite@5.1.6)(vue@3.4.21)
|
||||
@ -601,6 +604,10 @@ packages:
|
||||
undici-types: 5.26.5
|
||||
dev: true
|
||||
|
||||
/@vicons/ionicons5@0.12.0:
|
||||
resolution: {integrity: sha512-Iy1EUVRpX0WWxeu1VIReR1zsZLMc4fqpt223czR+Rpnrwu7pt46nbnC2ycO7ItI/uqDLJxnbcMC7FujKs9IfFA==}
|
||||
dev: true
|
||||
|
||||
/@vitejs/plugin-vue@5.0.4(vite@5.1.6)(vue@3.4.21):
|
||||
resolution: {integrity: sha512-WS3hevEszI6CEVEx28F8RjTX97k3KsrcY6kvTg7+Whm5y3oYvcqzVeGCU3hxSAn4uY2CLCkeokkGKpoctccilQ==}
|
||||
engines: {node: ^18.0.0 || >=20.0.0}
|
||||
|
@ -21,7 +21,7 @@
|
||||
{
|
||||
"title": "Text Recover",
|
||||
"width": 800,
|
||||
"height": 800
|
||||
"height": 600
|
||||
}
|
||||
],
|
||||
"security": {
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { ref, computed } from 'vue'
|
||||
import { codecs } from '@/utils/codecs.ts'
|
||||
import { EncodingConverter } from '@/utils/converter'
|
||||
import { useOsTheme, darkTheme } from 'naive-ui'
|
||||
@ -28,7 +28,7 @@ const handleTextInput = (text: string) => {
|
||||
<n-input
|
||||
v-model:value="content"
|
||||
type="textarea"
|
||||
placeholder="请输入待转换的乱码文本"
|
||||
placeholder="请输入待恢复的乱码文本"
|
||||
clearable
|
||||
class="input"
|
||||
@input="handleTextInput"
|
||||
@ -55,8 +55,6 @@ const handleTextInput = (text: string) => {
|
||||
|
||||
<style scoped lang="less">
|
||||
.container {
|
||||
// disable selection
|
||||
user-select: none;
|
||||
padding: 0.8rem;
|
||||
|
||||
.input {
|
||||
|
@ -4,44 +4,34 @@ export interface Codec {
|
||||
}
|
||||
|
||||
export const codecs: Codec[] = [
|
||||
{
|
||||
origin: 'GBK',
|
||||
target: 'UTF-8',
|
||||
},
|
||||
{
|
||||
origin: 'UTF-8',
|
||||
target: 'GBK',
|
||||
},
|
||||
{
|
||||
origin: 'GBK',
|
||||
target: 'ISO-8859-1',
|
||||
},
|
||||
{
|
||||
origin: 'GBK',
|
||||
target: 'BIG5',
|
||||
},
|
||||
{
|
||||
origin: 'GBK',
|
||||
target: 'UTF-16',
|
||||
},
|
||||
{
|
||||
origin: 'GBK',
|
||||
target: 'WINDOWS-1252',
|
||||
},
|
||||
{
|
||||
origin: 'UTF-8',
|
||||
target: 'ISO-8859-1',
|
||||
},
|
||||
{
|
||||
origin: 'UTF-8',
|
||||
target: 'BIG5',
|
||||
},
|
||||
{
|
||||
origin: 'UTF-8',
|
||||
target: 'UTF-16',
|
||||
},
|
||||
{
|
||||
origin: 'UTF-8',
|
||||
target: 'WINDOWS-1252',
|
||||
},
|
||||
{ origin: 'GBK', target: 'UTF-8' },
|
||||
{ origin: 'UTF-8', target: 'GBK' },
|
||||
{ origin: 'GBK', target: 'ISO-8859-1' },
|
||||
{ origin: 'GBK', target: 'BIG5' },
|
||||
{ origin: 'GBK', target: 'UTF-16' },
|
||||
{ origin: 'GBK', target: 'WINDOWS-1252' },
|
||||
{ origin: 'UTF-8', target: 'ISO-8859-1' },
|
||||
{ origin: 'UTF-8', target: 'BIG5' },
|
||||
{ origin: 'UTF-8', target: 'UTF-16' },
|
||||
{ origin: 'UTF-8', target: 'WINDOWS-1252' },
|
||||
{ origin: 'ISO-8859-1', target: 'UTF-8' },
|
||||
{ origin: 'ISO-8859-1', target: 'GBK' },
|
||||
{ origin: 'ISO-8859-1', target: 'BIG5' },
|
||||
{ origin: 'ISO-8859-1', target: 'UTF-16' },
|
||||
{ origin: 'ISO-8859-1', target: 'WINDOWS-1252' },
|
||||
{ origin: 'BIG5', target: 'UTF-8' },
|
||||
{ origin: 'BIG5', target: 'GBK' },
|
||||
{ origin: 'BIG5', target: 'ISO-8859-1' },
|
||||
{ origin: 'BIG5', target: 'UTF-16' },
|
||||
{ origin: 'BIG5', target: 'WINDOWS-1252' },
|
||||
{ origin: 'UTF-16', target: 'UTF-8' },
|
||||
{ origin: 'UTF-16', target: 'GBK' },
|
||||
{ origin: 'UTF-16', target: 'ISO-8859-1' },
|
||||
{ origin: 'UTF-16', target: 'BIG5' },
|
||||
{ origin: 'UTF-16', target: 'WINDOWS-1252' },
|
||||
{ origin: 'WINDOWS-1252', target: 'UTF-8' },
|
||||
{ origin: 'WINDOWS-1252', target: 'GBK' },
|
||||
{ origin: 'WINDOWS-1252', target: 'ISO-8859-1' },
|
||||
{ origin: 'WINDOWS-1252', target: 'BIG5' },
|
||||
{ origin: 'WINDOWS-1252', target: 'UTF-16' },
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user