跳到主要内容

Claude Cage · 面向 Claude 的隔离开发环境,支持桌面工作台、多账号、远程部署与移动端连接。上游 Lee-xeo/Claude-Cage 完整源码镜像,非灵栈原创;主许可 MIT,第三方组件遵循各自许可。来源:https://github.com/Lee-xeo/Claude-Cage 。手动同步,不附带 Release 安装包。

浏览文件

strings.js

28 行 · 745 B历史下载
1/*
2 * noVNC: HTML5 VNC client
3 * Copyright (C) 2019 The noVNC authors
4 * Licensed under MPL 2.0 (see LICENSE.txt)
5 *
6 * See README.md for usage and integration instructions.
7 */
8
9// Decode from UTF-8
10export function decodeUTF8(utf8string, allowLatin1=false) {
11 try {
12 return decodeURIComponent(escape(utf8string));
13 } catch (e) {
14 if (e instanceof URIError) {
15 if (allowLatin1) {
16 // If we allow Latin1 we can ignore any decoding fails
17 // and in these cases return the original string
18 return utf8string;
19 }
20 }
21 throw e;
22 }
23}
24
25// Encode to UTF-8
26export function encodeUTF8(DOMString) {
27 return unescape(encodeURIComponent(DOMString));
28}