Skip to content

armgit / orca

Public Imported from GitHub
0

Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

285 B
Raw Blame
import Foundation

/// Decode only well-formed UTF-8 without a leading BOM; JS TextDecoder owns replacement/BOM behavior.
func decodeStrictUtf8(_ input: Data) -> String? {
  if input.starts(with: [0xef, 0xbb, 0xbf]) {
    return nil
  }
  return String(data: input, encoding: .utf8)
}