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