From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id CaubBTDoWWPZDREAWB0awg (envelope-from ) for ; Wed, 26 Oct 2022 22:08:48 -0400 Received: by simark.ca (Postfix, from userid 112) id 0B3991E11A; Wed, 26 Oct 2022 22:08:48 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=yya2MfB0; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B0D431E0D5 for ; Wed, 26 Oct 2022 22:08:47 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 83B773886C4B for ; Thu, 27 Oct 2022 02:08:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 83B773886C4B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666836526; bh=v5AT1RTL/NfbzO6xy4BSuvyGRGt805fOxdys9nJ+JGU=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=yya2MfB0s223Q39W4dNVLrl1rHOXm+SEhObvse7whPnathOdPVs1kEZeyjMCWF9D7 1NoTEvJdIot9pFQ1NT4ASUS2Z+30xQ8w1RgHg9bnZCiQBxp5EELKLyR//t4DVcu4R/ nm3lnIFN8UwQ85oW0NCKnMFSqEUZ7qESFt2Txufs= 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 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) 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: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Tsukasa OI via Gdb-patches Reply-To: Tsukasa OI Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" 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