From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-sender-0.a4lg.com (mail-sender-0.a4lg.com [IPv6:2401:2500:203:30b:4000:6bfe:4757:0]) by sourceware.org (Postfix) with ESMTPS id CC0AB3885C3B for ; Thu, 27 Oct 2022 02:08:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CC0AB3885C3B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=irq.a4lg.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=irq.a4lg.com Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 3BC3F300089; Thu, 27 Oct 2022 02:08:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irq.a4lg.com; s=2017s01; t=1666836504; bh=v5AT1RTL/NfbzO6xy4BSuvyGRGt805fOxdys9nJ+JGU=; h=Message-ID:Date:Mime-Version:Subject:To:References:From: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=AwbMEHacvrH6LUcYSwhUHDb54cepejxdNRQy3ITWoP+4p/lYdLeQDqudNw3uSfoVH QEwjLdLNS6055rOtUj0DMyhEL4oA13vp3G4P5cFCJcH4bHc4RaVIus9U3WSJlWSVWx XSXTO0FWZUE0x6l3D1KZUuDuiJ4X0es+OHIkhhzs= Message-ID: Date: Thu, 27 Oct 2022 11:08:22 +0900 Mime-Version: 1.0 Subject: Re: [PATCH 18/40] sim/m32c: Stop using middle dot Content-Language: en-US To: gdb-patches@sourceware.org, Mike Frysinger References: From: Tsukasa OI In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2022/10/23 23:48, Mike Frysinger wrote: > On 20 Oct 2022 09:32, Tsukasa OI wrote: >> The led_off array used 0xB7 (Latin-1 middle dot) but it heavily depends on >> the source code encoding. Directly using 0xB7 here is very dangerous and > > "very dangerous" is questionable That's definitely an overreaction but forgive me since I'm from a character encoding hell (Japan, which had at least three widely-used pre-Unicode encodings). > >> Clang causes a compiler warning ("-Winvalid-source-encoding"). >> On the other hand, using '\u00b7' here will assume UTF-8> > we only care about UTF-8. no other encoding (except ASCII) matters. That's good to hear that. > >> As a workaround, this commit replaces uses of 0xB7 with '.' >> (regular ASCII dot). > > i don't have a sense of what this code is meant to do. is it just debug > output for devs staring at the console ? probably because of the CSI > escape sequences here (\e[m). if that's the case, i'm fine with changing > it. i'll note that the RX port seems to use @ & * instead ... > -mike I think this is a pseudo-LED output for console and middle dot (U+00B7) is used to represent off and "O" is used to represent on. It seems we can assume UTF-8 so I'll just re-encode this source file with UTF-8. Thanks, Tsukasa