lijinglue / libqq-pidgin

Automatically exported from code.google.com/p/libqq-pidgin
0 stars 0 forks source link

在 url 中禁止转义 qq 表情 #67

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. libqq send "http://goog.gl/xxxxxx" to other clients.
2.
3.

What is the expected output? What do you see instead?
recieved "http:/[表情图片]o.gl/xxxxxx"
»/go« 被转义掉了……

*[表情图片] => http://0.web.qstatic.com/webqqpic/style/face/82.gif

What version of the product are you using? On what operating system?
os: archlinux
r131
对方:TenCent qq 2010, webqq, etc...

Please provide any additional information below.
TenCent qq 2010(关闭自动转义), webqq 直接发送到 libqq 没问题。

看了下 debug 信息,怀疑表情转义是由 <font sml=""> 来控制的。

Original issue reported on code.google.com by Alvin....@gmail.com on 17 Mar 2011 at 1:07

Attachments:

GoogleCodeExporter commented 9 years ago
增加<font sml="none">标签可以忽略表情转义

关闭表情,不如完善表情库,希望有谁帮我整理好表情库
表情文件这里可以获得:
http://forum.ubuntu.com.cn/download/file.php?id=117352&sid=9f61c62ff480b5b3dea71
463ba67f775
这个包里表情可能不全,THEME配置文件也有问题

我想把/GO这样的符号换成/GO$这种形式,如果有谁愿意改,MAIL
联系我

Original comment by V.E.O.T...@gmail.com on 17 Mar 2011 at 3:47

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
不过我还是希望能有相关的选项来设置 <font sml="none"> 
这个属性。相对于我,关闭了 pidgin 里所有的表情(smiley theme 
= none),就比较偏向于将该值永久设置为 none

我周末可以看看帮你搞定这份表情列表。

同时你提供的那份列表里没有完整的列出那些 alternative 
的表情符号,
比如 微笑 可以由 /微笑 /wx /:) 等来表示…… 
虽然经由服务器转发后,只有 /wx

还有就是,因为我这边 smiley theme 为 none, 
而qq又不使用通用的字符表情,所以在收到 /fd /yb 
之类的就无法了解该表情指定的是哪个了…… 
可以的话,也希望能 hack 这个

Original comment by Alvin....@gmail.com on 17 Mar 2011 at 4:00

GoogleCodeExporter commented 9 years ago
对,这个THEME文件应该是从QQ 
2010中文版转的,/:)是国际版的方式,/微笑是新加的方式
我认为不能使用中文,编码成UTF8后,不定出现什么问题

找人帮改这个的主要三部分:1,/XX表情全部改为/XX$的形式 
2,THEME文件加入国际版的符号
3,IM.C里的表情库也修改

<font 
sml="none">只有QQ协议用过,LIBPURPLE更没提供去处表情的选项
如果换新形式,冲突的可能大大降低

Original comment by V.E.O.T...@gmail.com on 17 Mar 2011 at 4:17

GoogleCodeExporter commented 9 years ago
TenCent qq 2008 的时候就支持这3种格式的表情的符号的,中文: 
/微笑,中文拼音缩写 /wx, 通用符号 /:)

得在 Vbox 里测试几个版本的符号的……

1,/XX表情全部改为/XX$的形式 => regex 搞定
2,THEME文件加入国际版的符号 => 
国际版其实就是很早前或者说最早的时候用的符号 (qq_emoticon 
emoticons_std: 0x4f .. 0x97, 或许又修改)
3,IM.C里的表情库也修改 ->2

还是尽可能的将各种符号补全。

Original comment by Alvin....@gmail.com on 17 Mar 2011 at 4:28

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
<font sml="none"> 能否加入 下面这个 struct 呢?

/* im.h line 68: */
typedef struct {
    guint8 font_size;
    guint8 attr;
    guint8 rgb[3];
    guint16 charset;
    gchar *font;
    guint8 font_len;
} qq_im_format;

又或者通过 pidgin preference 里边 smiley theme 是否为 none 来判断

Original comment by Alvin....@gmail.com on 17 Mar 2011 at 4:33

GoogleCodeExporter commented 9 years ago
修改了几个错误的 符号
未修正 im.c 里的列表……

不知道是不是你要的结果…… => list3

list2 尚未修正 16进制 的对应

Original comment by Alvin....@gmail.com on 17 Mar 2011 at 9:26

Attachments:

GoogleCodeExporter commented 9 years ago
Many Thanks!
不需要加十六进制值,list3可以和GIF表情打包第三方发布出来
,但不能直接放在项目里(有版权)

IM.C里 emoticons_std 
为表情关系库,每个十六进制字节对应一个表情
emoticons_ext暂不用动

emoticons_sym是按十六进制顺序的反向表情库

好了以后可以发给我

Original comment by V.E.O.T...@gmail.com on 19 Mar 2011 at 8:25

GoogleCodeExporter commented 9 years ago
只是简单的从 TenCent QQ 发送表情,并在 pidgin Debug Window 
读取相应 smiley 的 hex 值... 不知道这样获取的是否正确。

im.c:
static qq_emoticon emoticons_std[]
static qq_emoticon emoticons_sym[]
更正完成。

attached files:
im.c => 俩 qq_emoticon
theme => 更正后的 theme 列表 
(gif图片还是使用由你提供的ubuntu论坛的表情库)
list2 => 附带 hex 列表的 theme 列表

Original comment by Alvin....@gmail.com on 19 Mar 2011 at 10:44

Attachments:

GoogleCodeExporter commented 9 years ago
fixed in r133

Original comment by V.E.O.T...@gmail.com on 20 Mar 2011 at 5:28

GoogleCodeExporter commented 9 years ago
表情功能完全修复!
可以用改过的原版库
http://u.115.com/file/t28514fff8

linux下复制到/usr/share/pixmaps/pidgin/emotes
windows下复制到pidgin目录/pixmaps/pidgin/emotes

然后在首选项里,主题,选择QQ就能使用原版表情

表情包不放入项目中,有部分表情QQ客户端显示不了,只能在
PIDGIN用户之间使用

Original comment by V.E.O.T...@gmail.com on 20 Mar 2011 at 5:37

GoogleCodeExporter commented 9 years ago
我这发出去对方接收到的都是
“胜利”的表情!

Original comment by lyh...@gmail.com on 21 Mar 2011 at 12:03

GoogleCodeExporter commented 9 years ago
试下最新版

Original comment by V.E.O.T...@gmail.com on 21 Mar 2011 at 2:45

GoogleCodeExporter commented 9 years ago
qq 表情没有和 pidgin 表情对应起来……

抱歉 v.e.o. 忘了修正 pidgin 的表情 theme 了……
file:///usr/share/pixmaps/pidgin/emotes/default/theme

晚点修正后再提交给你
以后这个项目要 merge 到 pidgin 项目中的话,就得要提交这个 
theme 的。

Original comment by Alvin....@gmail.com on 21 Mar 2011 at 3:17

GoogleCodeExporter commented 9 years ago
我做的那个THEME已经合并QQ和PIDGIN的了,使用PIDGIN原版THEME也��
�以了

Original comment by V.E.O.T...@gmail.com on 21 Mar 2011 at 3:20

GoogleCodeExporter commented 9 years ago
@17,

webqq => libqq: 发送 /wx 的表情
libqq 接收到:
(16:33:17) QQ: ==> [60087] CMD_RECV_IM 0x0017, version tag 0x1E0D len 119
(16:33:17) QQ: <== [SRV-60087] CMD_RECV_IM(0x0017), datalen 16
(16:33:17) QQ: Got IM to 527624294, type: 0B from: 1755622951 ver: Unknown 
Version (0E09)
(16:33:17) QQ: IM Seq 60087, id 0000, fragment 0-1, type 1, 
(16:33:17) QQ: Failed reading icon file 
/usr/share/pixmaps/purple/buddy_icons/qq/qq_1.png
(16:33:17) QQ: IM from 1755622951: <font size="3"><font face="Verdana"><font 
color="#000000"><font sml="none">O</font></font></font></font>

Original comment by Alvin....@gmail.com on 21 Mar 2011 at 3:35

GoogleCodeExporter commented 9 years ago
Comment 13 by project member V.E.O@TOM.COM, Yesterday (22 hours ago)

表情功能完全修复!
可以用改过的原版库
http://u.115.com/file/t28514fff8

linux下复制到/usr/share/pixmaps/pidgin/emotes
windows下复制到pidgin目录/pixmaps/pidgin/emotes

然后在首选项里,主题,选择QQ就能使用原版表情

表情包不放入项目中,有部分表情QQ客户端显示不了,只能在
PIDGIN用户之间使用
------------------------------------------------------------------

linux 下请将 qq 表情包 放到 ~/.purple/smileys 下。

Original comment by Alvin....@gmail.com on 21 Mar 2011 at 3:40

GoogleCodeExporter commented 9 years ago
Comment 17 by project member V.E.O@TOM.COM, Today (21 minutes ago)

我做的那个THEME已经合并QQ和PIDGIN的了,使用PIDGIN原版THEME也��
�以了

----------------------------------------------------------------------------

default theme 也得修正,并全部使用 pidgin 原始 png 
图片。毕竟当前这个 qq 表情包因版权问题不会加入 pidgin 
项目的,那么别的很多人要使用的话,还是使用原始的 
default theme,或者 small theme。

那些 qq gif 图片在 
慢的机器上卡死……(你可以测试下,`cpufreq-set -u 800MHz` 
...)

Original comment by Alvin....@gmail.com on 21 Mar 2011 at 3:44

GoogleCodeExporter commented 9 years ago
恩,你可以再发布一个静态表情包
http://forum.ubuntu.org.cn/viewtopic.php?f=73&t=219469&start=0
然后把THEME里GIF换成PNG

Original comment by V.E.O.T...@gmail.com on 23 Mar 2011 at 1:57

GoogleCodeExporter commented 9 years ago
@V.E.O:

我希望能在 smiley theme 为 none 
的时候能够显示对应表情符号的释义,比如: 接收到 /wx$ 
时,显示 /微笑$ 或者其他类似方案。

我改动了 im.c => static qq_emoticon emoticons_sym[]
没效果……
不知道将 qq表情符号解析为 pidgin 
的符号时,使用的是哪些数组或者语句

还有:代码里边,换行怎么有两种?一种 unix/linux 
的换行,另一种是 ms windows 的换行。

Original comment by Alvin....@gmail.com on 9 Apr 2011 at 10:42

Attachments:

GoogleCodeExporter commented 9 years ago
是这样的,IM.C里模块负责把编码后的表情解析成/WX$这种,剩
余的靠PIDGIN自己找到/WX$对应的图片,如果没有找到(THEME里没�
��)就显示原来的,我之所以使用/wx$(原来是想使用国际版��
�英文的/smile$),是因为中文可能会导致问题
本地化可以使用GETTEXT,写到PIDGIN源码的PO里,不过那必须进��
�PIDGIN项目里

Original comment by V.E.O.T...@gmail.com on 10 Apr 2011 at 1:07

GoogleCodeExporter commented 9 years ago
我用VS这个IDE,所以是MS的换行,GCC应该可以忽略多出来的回�
��

Original comment by V.E.O.T...@gmail.com on 10 Apr 2011 at 1:09

GoogleCodeExporter commented 9 years ago
发一个我改着玩的表情包。

Original comment by young40...@gmail.com on 11 Apr 2011 at 4:43

Attachments:

GoogleCodeExporter commented 9 years ago
现在到底是什么状况哦,我安装了那个表情包,别人发给我��
�能够正常显示,但是我发给别人都显示的转义符,怎么办啊�
��

Original comment by Quinta.D...@gmail.com on 13 Jun 2011 at 11:39

GoogleCodeExporter commented 9 years ago
对方没装没用的

Original comment by V.E.O.T...@gmail.com on 13 Jun 2011 at 8:59

GoogleCodeExporter commented 9 years ago
这个应该是最全的表情吧,我的机器环境是gentoo x86_64:
1)cd ~/.purple/smileys
2)mkdir QQFace
3)cd QQFace
4)for (( i=0;i<135;i++ ));do wget 
http://0.web.qstatic.com/webqqpic/style/face/$i.gif;done
5)ln -s /usr/share/pixmaps/pidgin/emotes/default/*.png .
6)下载

Original comment by kingbo.l...@gmail.com on 6 Mar 2012 at 2:33

Attachments:

GoogleCodeExporter commented 9 years ago
花了一天的时间研究出来的,libqq发出只能显示转义符,是因
为转义定义后都少了一个$,而QQ发过来的表情会多一个$,所以
我重新做了转义定义,同时也测试了105.gif-134.gif(根据libqq200
6),都可以用,所以这个表情库应该是最全的了134个,比webqq�
��的104个要多哦。
那个theme也要放到~/.purple/smileys/QQFace下,同量pidgin选项内要选
择Default+QQ2010这个表情

Original comment by kingbo.l...@gmail.com on 6 Mar 2012 at 2:39

GoogleCodeExporter commented 9 years ago
而且QQ表情是动画的哦

Original comment by kingbo.l...@gmail.com on 6 Mar 2012 at 2:40